{"action":"closed","issue":{"url":"https://api.github.com/repos/lomik/go-carbon/issues/3","labels_url":"https://api.github.com/repos/lomik/go-carbon/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/lomik/go-carbon/issues/3/comments","events_url":"https://api.github.com/repos/lomik/go-carbon/issues/3/events","html_url":"https://github.com/lomik/go-carbon/issues/3","id":59153512,"number":3,"title":"tests for points seem overly strict.","user":{"login":"drawks","id":410276,"avatar_url":"https://avatars.githubusercontent.com/u/410276?v=3","gravatar_id":"","url":"https://api.github.com/users/drawks","html_url":"https://github.com/drawks","followers_url":"https://api.github.com/users/drawks/followers","following_url":"https://api.github.com/users/drawks/following{/other_user}","gists_url":"https://api.github.com/users/drawks/gists{/gist_id}","starred_url":"https://api.github.com/users/drawks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drawks/subscriptions","organizations_url":"https://api.github.com/users/drawks/orgs","repos_url":"https://api.github.com/users/drawks/repos","events_url":"https://api.github.com/users/drawks/events{/privacy}","received_events_url":"https://api.github.com/users/drawks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T22:17:39Z","updated_at":"2015-02-26T22:45:33Z","closed_at":"2015-02-26T22:45:33Z","body":"Currently there are a bunch of tests in points_test.go that appear to be designed for errors raised on minor problems with the input to ParseText. I notice however that it doesn't appear that ParseText implements the checks which the test expects.\r\n\r\nI suppose that it makes sense to write the test first and then implement the expected behavior, however... in this case I think that the additional sanitization of input is unneeded. For instance \"foo..bar\" splits to fields like [\"foo\",\"\",\"bar\"] which, when building the path with filepath.join ends up collapsing out the empty path element. Similarly a leading \".\" ends up causing an empty path element between the storage directory and the whisper file name which similarly is collapsed.\r\n\r\nThe additional step of sanitization of these metric names would seem to be a wasted effort, even metric names like \"foo.bar..\" lead to only marginally confusing whisper file names like \"foo/bar/.wsp\" which arguably are valid and should be allowed."}}