Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an isort linter for Python imports #2

Merged
merged 1 commit into from
Mar 15, 2018
Merged

Add an isort linter for Python imports #2

merged 1 commit into from
Mar 15, 2018

Conversation

jparise
Copy link
Collaborator

@jparise jparise commented Mar 15, 2018

No description provided.

@jparise jparise merged commit 500e927 into master Mar 15, 2018
@jparise jparise deleted the isort branch March 15, 2018 22:44
jhurwitz added a commit to jhurwitz/arcanist-linters that referenced this pull request Oct 15, 2019
`$offense['ruleId'] || 'unknown'` was returning a bool (true) which
caused the following exception when arc tried to post the lint results
via the `harbormaster.sendmessage` API:
```
[2019-10-15 01:34:16] EXCEPTION: (ConduitClientException) ERR-CONDUIT-CORE: Parameter 'name' has invalid type. Expected type 'string', got type 'bool'. at [<phutil>/src/conduit/ConduitFuture.php:62]
arcanist(head=master, ref.master=96fde137a1dc), linters(head=test, ref.master=81e8d886d5c8, ref.test=f20a8b42a357), phutil(head=master, ref.master=f434f57578dd)
  #0 <pinterest#2> ConduitFuture::didReceiveResult(array) called at [<phutil>/src/future/FutureProxy.php:58]
  pinterest#1 <pinterest#2> FutureProxy::getResult() called at [<phutil>/src/future/FutureProxy.php:35]
  pinterest#2 <pinterest#2> FutureProxy::resolve() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2999]
  pinterest#3 phlog(ConduitClientException) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:3005]
  pinterest#4 ArcanistDiffWorkflow::updateAutotargets(string, NULL) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:537]
  pinterest#5 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
```

In these cases, `arc lint` and `arc diff` would successfully run, but
the diff created on Phabricator would not show any details about what
the lint errors/warnings were, or what line numbers they were on.

With this fix, you can once again see the details of the lint errors and
warnings in the Differential UI on Phabricator.

I also changed the default name (when `$offense['ruleId']` is not
defined) from `unknown` to `ESLintLinter`, and tested both cases:
https://www.dropbox.com/s/0mb54bf5xfe34hi/Screenshot%202019-10-14%2019.20.51.png?dl=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant