Fix: no-unused-vars to check only file globals (fixes #975)
Merge pull request #981 from roadhump/issue_975

Rule `no-unused-vars` checks only file globals (fixes #975)