Page MenuHomePhabricator

Lint config is not relative to repository root
Closed, ResolvedPublic

Description

When passing a --config flag to the jshint linter, the path to the config file is resolved relative to wherever arc is executed. Expected behavior is that the path should be resolved relative to the repository root.

Sample .arclint file:

{
  "linters": {
    "jshint": {
      "type": "jshint",
      "flags": [
        "--config=ember/.jshintrc"
      ],
      "include": "@^ember/.*\\.js$@",
      "exclude": [
        "@^ember/app/scripts/vendor@"
      ]
    }
  }
}

Event Timeline

john.snow raised the priority of this task from to Needs Triage.
john.snow updated the task description. (Show Details)
john.snow added a project: Arcanist.
john.snow added a subscriber: john.snow.

I have a diff awaiting code review that should fix this.

I think a better / more general fix is setCWD($project_root) on the Future. Is that practical?

Particularly, that will cover a case where, e.g., you configure some file and that file has other configuration in it which points to relative file locations.

joshuaspence edited this Maniphest Task.