{"action":"created","issue":{"url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/213","labels_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/213/comments","events_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/213/events","html_url":"https://github.com/dennisdoomen/fluentassertions/issues/213","id":54072857,"number":213,"title":"Adding StyleCop","user":{"login":"konstmsu","id":1784662,"avatar_url":"https://avatars.githubusercontent.com/u/1784662?v=3","gravatar_id":"","url":"https://api.github.com/users/konstmsu","html_url":"https://github.com/konstmsu","followers_url":"https://api.github.com/users/konstmsu/followers","following_url":"https://api.github.com/users/konstmsu/following{/other_user}","gists_url":"https://api.github.com/users/konstmsu/gists{/gist_id}","starred_url":"https://api.github.com/users/konstmsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konstmsu/subscriptions","organizations_url":"https://api.github.com/users/konstmsu/orgs","repos_url":"https://api.github.com/users/konstmsu/repos","events_url":"https://api.github.com/users/konstmsu/events{/privacy}","received_events_url":"https://api.github.com/users/konstmsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-12T16:19:01Z","updated_at":"2015-01-12T18:15:15Z","closed_at":null,"body":"What do you think if we add StyleCop to validate coding guidelines? It can detect missing brackets forcing\r\n\r\n    if (a) B();\r\n\r\nand\r\n\r\n    if (a)\r\n        B();\r\n\r\nto be\r\n\r\n    if (a)\r\n    {\r\n        B();\r\n    }\r\n\r\nUnfortunately if we enforce this rule then they will have to be added to lines like this:\r\n\r\n    if (considered.Contains(subInterface)) continue;\r\n\r\nand\r\n\r\n    if (ReferenceEquals(null, obj)) return false;\r\n    if (ReferenceEquals(this, obj)) return true;\r\n    if (obj.GetType() != this.GetType()) return false;\r\n\r\nThere are 7 lines like these that would need changing but the whole codebase will be checked for consistency."},"comment":{"url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/comments/69616716","html_url":"https://github.com/dennisdoomen/fluentassertions/issues/213#issuecomment-69616716","issue_url":"https://api.github.com/repos/dennisdoomen/fluentassertions/issues/213","id":69616716,"user":{"login":"vossad01","id":965439,"avatar_url":"https://avatars.githubusercontent.com/u/965439?v=3","gravatar_id":"","url":"https://api.github.com/users/vossad01","html_url":"https://github.com/vossad01","followers_url":"https://api.github.com/users/vossad01/followers","following_url":"https://api.github.com/users/vossad01/following{/other_user}","gists_url":"https://api.github.com/users/vossad01/gists{/gist_id}","starred_url":"https://api.github.com/users/vossad01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vossad01/subscriptions","organizations_url":"https://api.github.com/users/vossad01/orgs","repos_url":"https://api.github.com/users/vossad01/repos","events_url":"https://api.github.com/users/vossad01/events{/privacy}","received_events_url":"https://api.github.com/users/vossad01/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T18:15:15Z","updated_at":"2015-01-12T18:15:15Z","body":"@konstmsu In this case would StyleCop be enforcing the policy on build?  Or itself formatting the code?\r\n\r\nI know it can do the former but I am not sure about the latter.  I use StyleCop as a ReSharper plug-in so that ReSharper can better show/respect StyleCop rules, but I have never tried using StyleCop standalone before."}}