Page MenuHomePhabricator

Missing required parameters: script-and-regex.script, script-and-regex.regex at [<phutil>/src/parser/PhutilTypeSpec.php:164]
Closed, ResolvedPublic

Description

I updated our copy of the repo to the latest commit today, but something is wrong somewhere and I have no clue where to look from the stack trace - maybe you know?

Our .arcconfig:

{
  "phabricator.uri" : "https://shift.phacility.com/",
  "linter.scriptandregex.script": "scripts/lib/arc-lint-gofmt",
  "linter.scriptandregex.regex": "/^(?P<message>.*)$/m",

  "script-and-regex.script": "scripts/lib/arc-lint-gofmt",
  "script-and-regex.regex": "/^(?P<message>.*)$/m"
}

I saw a commit about modernizing script-and-regex so I added the last two lines there to see if that would fix the error, and maybe it was just a formatting update.. but no dice.

elsigh@Lindseys-MacBook-Pro:~/src/shift/s0 (go-tests) $ ./scripts/arc linters --trace
libphutil loaded from '/Users/elsigh/src/shift/s0/_build/_tools/arc/libphutil/src'.
arcanist loaded from '/Users/elsigh/src/shift/s0/_build/_tools/arc/arcanist/src'.
Config: Reading user configuration file "/Users/elsigh/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/Users/elsigh/src/shift/s0/.arcconfig".
Working Copy: Path "/Users/elsigh/src/shift/s0" is part of `git` working copy "/Users/elsigh/src/shift/s0".
Working Copy: Project root is at "/Users/elsigh/src/shift/s0".
Config: Did not find local configuration at "/Users/elsigh/src/shift/s0/.git/arc/config".

[2015-07-07 01:11:46] EXCEPTION: (PhutilTypeMissingParametersException) Missing required parameters: script-and-regex.script, script-and-regex.regex at [<phutil>/src/parser/PhutilTypeSpec.php:164]
arcanist(head=d54cb072facdd0116b20f70317c6e16f95a975a6, ref.master=d54cb072facd), phutil(head=7df0fc1297f9aad2d506dfa1baefdd04b2154a9a, ref.master=c2cd90ee7aec)
  #0 PhutilTypeSpec::checkMap(array, array) called at [<arcanist>/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php:90]
  #1 ArcanistConfigurationDrivenLintEngine::buildLinters() called at [<arcanist>/src/workflow/ArcanistLintersWorkflow.php:44]
  #2 ArcanistLintersWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]

Event Timeline

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

Linters only take their configuration from .arclint file now (T8333 for the no-warning-about-this).

The .arclint would look something like this:

{
    "linters": {
        "gofmt": {
            "type": "script-and-regex",
            "script-and-regex.script": "scripts/lib/arc-lint-gofmt",
            "script-and-regex.regex": "/^(?P<message>.*)$/m"
        }
    }
}
elsigh claimed this task.

Ah, cool - glad to see there's already an issue for the no-warning too ;)