{"action":"created","issue":{"url":"https://api.github.com/repos/theodi/csvlint/issues/183","labels_url":"https://api.github.com/repos/theodi/csvlint/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/theodi/csvlint/issues/183/comments","events_url":"https://api.github.com/repos/theodi/csvlint/issues/183/events","html_url":"https://github.com/theodi/csvlint/issues/183","id":84187408,"number":183,"title":"Unique constraint (in schema) is not working","user":{"login":"scrybbler","id":12719803,"avatar_url":"https://avatars.githubusercontent.com/u/12719803?v=3","gravatar_id":"","url":"https://api.github.com/users/scrybbler","html_url":"https://github.com/scrybbler","followers_url":"https://api.github.com/users/scrybbler/followers","following_url":"https://api.github.com/users/scrybbler/following{/other_user}","gists_url":"https://api.github.com/users/scrybbler/gists{/gist_id}","starred_url":"https://api.github.com/users/scrybbler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrybbler/subscriptions","organizations_url":"https://api.github.com/users/scrybbler/orgs","repos_url":"https://api.github.com/users/scrybbler/repos","events_url":"https://api.github.com/users/scrybbler/events{/privacy}","received_events_url":"https://api.github.com/users/scrybbler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-02T20:03:58Z","updated_at":"2015-06-02T20:30:37Z","closed_at":null,"body":"Uniqueness is not being tested, apparently.\r\n\r\nHere are my csv and schema respectively:\r\nhttps://drive.google.com/file/d/0B3CDKorSOdGNNm1CbXFrUmlFY1U/view?usp=sharing\r\nhttps://drive.google.com/file/d/0B3CDKorSOdGNN3JlZ2pDLWNKaXc/view?usp=sharing\r\n\r\nThe constraint is violated on lines 3 & 5 (column 1) and 4 & 12 (column 8) of the data. Those pairs are the lines where data is repeated.\r\n\r\nThe validator reports no errors or warnings on those data columns."},"comment":{"url":"https://api.github.com/repos/theodi/csvlint/issues/comments/108089703","html_url":"https://github.com/theodi/csvlint/issues/183#issuecomment-108089703","issue_url":"https://api.github.com/repos/theodi/csvlint/issues/183","id":108089703,"user":{"login":"ldodds","id":109082,"avatar_url":"https://avatars.githubusercontent.com/u/109082?v=3","gravatar_id":"","url":"https://api.github.com/users/ldodds","html_url":"https://github.com/ldodds","followers_url":"https://api.github.com/users/ldodds/followers","following_url":"https://api.github.com/users/ldodds/following{/other_user}","gists_url":"https://api.github.com/users/ldodds/gists{/gist_id}","starred_url":"https://api.github.com/users/ldodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldodds/subscriptions","organizations_url":"https://api.github.com/users/ldodds/orgs","repos_url":"https://api.github.com/users/ldodds/repos","events_url":"https://api.github.com/users/ldodds/events{/privacy}","received_events_url":"https://api.github.com/users/ldodds/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T20:30:37Z","updated_at":"2015-06-02T20:30:37Z","body":"Hi @scrybbler, I've just taken a quick look at this. The constraint isn't being applied because the application is failing to correctly parse your JSON schema.\r\n\r\nCurrently if it fails to load a schema it just falls back to processing the file without, this is something that we should probably change.\r\n\r\nIf you paste your schema into http://jsonlint.com/ you'll see that its not valid JSON. I found that there were several extra brackets, and a stray comma.\r\n\r\nThe regular expression that matches the home page URL is also invalid, the asterisk character means \"zero or more\" but because its at the start of the regular expression, the parser doesn't know what its matching. The slash and ? characters also need to be escaped.\r\n\r\nOnce I'd correct those and tried the schema again, it correctly reports several unique constraints.\r\n\r\nCan I ask you to retest with a fixed schema? Here's the version I used locally: https://gist.github.com/ldodds/b0ae664e623ec62f595c\r\n\r\n"}}