{"comment":{"url":"https://api.github.com/repos/nwolfe/trapperkeeper-authorization/comments/13217198","html_url":"https://github.com/nwolfe/trapperkeeper-authorization/commit/2cdf412dd92307743a0a02b2bbeb17f51f9d2726#commitcomment-13217198","id":13217198,"user":{"login":"camlow325","id":5652737,"avatar_url":"https://avatars.githubusercontent.com/u/5652737?v=3","gravatar_id":"","url":"https://api.github.com/users/camlow325","html_url":"https://github.com/camlow325","followers_url":"https://api.github.com/users/camlow325/followers","following_url":"https://api.github.com/users/camlow325/following{/other_user}","gists_url":"https://api.github.com/users/camlow325/gists{/gist_id}","starred_url":"https://api.github.com/users/camlow325/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camlow325/subscriptions","organizations_url":"https://api.github.com/users/camlow325/orgs","repos_url":"https://api.github.com/users/camlow325/repos","events_url":"https://api.github.com/users/camlow325/events{/privacy}","received_events_url":"https://api.github.com/users/camlow325/received_events","type":"User","site_admin":false},"position":19,"line":192,"path":"src/puppetlabs/trapperkeeper/services/authorization/authorization_core.clj","commit_id":"2cdf412dd92307743a0a02b2bbeb17f51f9d2726","created_at":"2015-09-14T16:20:12Z","updated_at":"2015-09-14T16:20:12Z","body":"(whoa), cool.\r\n\r\nWhile I think this would give you a pretty complete set of warnings related to mismatches of one element in the pre-sorted vs. the corresponding element in the sorted representation, I could see situations in which you'd get what might seem to be an excessive number of warnings.  For example, if you had 100 rules arranged in proper ascending order with respect to the `sort-order` field except for the largest `sort-order` being the first one in the list, I think you'd end up getting 100 warning messages - one for each line mismatched - as opposed to just one message for the single rule that would seem to be what is out of order.\r\n\r\nI probably would have gone instead with an algorithm which only writes a warning message when one rule in the pre-sorted list has a `sort-order` that is later than the `sort-order` which follows it rather than comparing elements across the pre-sorted and sorted lists.  I don't think we should burn much more time on this, though, so unless this would look extremely straightforward to do, I'd punt on doing anything further with this."}}