{"action":"created","issue":{"url":"https://api.github.com/repos/mpeterv/luacheck/issues/51","repository_url":"https://api.github.com/repos/mpeterv/luacheck","labels_url":"https://api.github.com/repos/mpeterv/luacheck/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/mpeterv/luacheck/issues/51/comments","events_url":"https://api.github.com/repos/mpeterv/luacheck/issues/51/events","html_url":"https://github.com/mpeterv/luacheck/issues/51","id":134584079,"number":51,"title":"Inline 'std' directive not obeyed","user":{"login":"mwild1","id":24315,"avatar_url":"https://avatars.githubusercontent.com/u/24315?v=3","gravatar_id":"","url":"https://api.github.com/users/mwild1","html_url":"https://github.com/mwild1","followers_url":"https://api.github.com/users/mwild1/followers","following_url":"https://api.github.com/users/mwild1/following{/other_user}","gists_url":"https://api.github.com/users/mwild1/gists{/gist_id}","starred_url":"https://api.github.com/users/mwild1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwild1/subscriptions","organizations_url":"https://api.github.com/users/mwild1/orgs","repos_url":"https://api.github.com/users/mwild1/repos","events_url":"https://api.github.com/users/mwild1/events{/privacy}","received_events_url":"https://api.github.com/users/mwild1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mpeterv/luacheck/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-18T13:42:09Z","updated_at":"2016-02-18T14:47:12Z","closed_at":null,"body":"Easiest with an example:\r\n\r\n```\r\n$ cat t.lua \r\nprint(\"hello world\")\r\n\r\n$ luacheck -q --std none t.lua \r\nChecking t.lua                                    1 warning\r\n\r\n    t.lua:2:1: accessing undefined variable print\r\n\r\nTotal: 1 warning / 0 errors in 1 file\r\n```\r\nExpected behaviour so far. But if I add the std none as an inline directive, it has no effect:\r\n\r\n```\r\n$ cat t.lua \r\n--luacheck: std none\r\nprint(\"hello world\")\r\n\r\n$ luacheck -q t.lua \r\nTotal: 0 warnings / 0 errors in 1 file\r\n```"},"comment":{"url":"https://api.github.com/repos/mpeterv/luacheck/issues/comments/185751759","html_url":"https://github.com/mpeterv/luacheck/issues/51#issuecomment-185751759","issue_url":"https://api.github.com/repos/mpeterv/luacheck/issues/51","id":185751759,"user":{"login":"mwild1","id":24315,"avatar_url":"https://avatars.githubusercontent.com/u/24315?v=3","gravatar_id":"","url":"https://api.github.com/users/mwild1","html_url":"https://github.com/mwild1","followers_url":"https://api.github.com/users/mwild1/followers","following_url":"https://api.github.com/users/mwild1/following{/other_user}","gists_url":"https://api.github.com/users/mwild1/gists{/gist_id}","starred_url":"https://api.github.com/users/mwild1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwild1/subscriptions","organizations_url":"https://api.github.com/users/mwild1/orgs","repos_url":"https://api.github.com/users/mwild1/repos","events_url":"https://api.github.com/users/mwild1/events{/privacy}","received_events_url":"https://api.github.com/users/mwild1/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T14:47:12Z","updated_at":"2016-02-18T14:47:12Z","body":"My expectation is that std has a set of values (none, min, max, etc.), and I expected std to be 'none' for this file, and override what was specified on the command line (or the default). Other files in the same run would be handled using the default std value.\r\n\r\nIf it helps, the root problem we are trying to solve is that luacheck does not detect:\r\n\r\n```\r\n_ENV = nil\r\nprint(\"hello world\")\r\n```\r\n\r\nI expected that this would fix that:\r\n\r\n```\r\n--luacheck: std none\r\n_ENV = nil\r\nprint(\"hello world\")\r\n```"}}