1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00
Commit graph

1481 commits

Author SHA1 Message Date
Joshua Spence
b4b6a33d2a Relax the version regex for ArcanistFlake8Linter.
Summary: As noticed by @epriestley in D9060, `flake8 --version` can emit a string like "2.0" rather than the expected "2.0.0".

Test Plan: Uninstalled my existing version of `flake8` (v2.1.0) and installed a prior version (`pip install flake8==2.0.0`). Ran `flake8 --version` and inspected the output.

Reviewers: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D9174
2014-05-17 18:18:03 -07:00
Joshua Spence
7c56fad48f Fix the ArcanistJSHintLinter::getVersion function.
Summary: As identified by @epriestley in D9060, `jshint --version` emits version information on stderr, not stdout.

Test Plan: Ran `jshint --version` locally and verified that the version information is output to stderr.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4954

Differential Revision: https://secure.phabricator.com/D9173
2014-05-17 18:17:47 -07:00
epriestley
b52f3fafe3 Fix "arc diff --raw-command --create"
Summary: Fixes T5082. We try to access the repository API in some cases when we don't have one.

Test Plan:
  - Made revisions with "arc diff --raw-command --create".
  - Made this revision, without "--raw-command".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5082

Differential Revision: https://secure.phabricator.com/D9165
2014-05-17 13:40:05 -07:00
Joshua Spence
1493e043e1 Add an ArcanistCoffeeLintLinter linter.
Summary:
Add a wrapper around [[http://www.coffeelint.org/ | CoffeeLint]] as an `ArcanistExternalLinter`.

Depends on D9041.

Test Plan: Wrote and executed unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9051
2014-05-16 21:58:53 -07:00
Joshua Spence
7bde5941cf Set the working directory to the project root for external linter ExecFuture classes.
Summary: Fixes T5085. Currently, the `ExecFuture` instances that are used to call an external linter are executed in the current working directory. This means that if a path is specified in the `.arclint` file, relative to the project root directory, that the path will not be properly interpreted by the external linter when `arc lint` is called from a level deeper than the project root.

Test Plan: Ran `arc lint` from a subdirectory of a project and verified that the linter did not throw an exception due to not being able to find the specified configuration file.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5085

Differential Revision: https://secure.phabricator.com/D9159
2014-05-16 21:48:12 -07:00
Joshua Spence
8cd9cb1047 Add some .arclint configuration options for ArcanistJSHintLinter.
Summary:
Allow `.jshintrc` and `.jshintignore` paths to be passed to `jshint`.

Ref T2039.

Test Plan: Added the `jshintrc` and `jshintignore` keys to an `.arclint` file that was configured to use `ArcanistJSHintLinter`. Ran `arc lint --trace` and inspected the flags that were passed to `jshint`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: john.snow, epriestley, Korvin

Maniphest Tasks: T2039, T5085

Differential Revision: https://secure.phabricator.com/D9112
2014-05-16 21:42:52 -07:00
Joshua Spence
35a26718d8 Add a linter rule for determining when single quotes should be used over double quotes.
Summary: Personally, I am a strong fan of this rule. There is currently a similar rule provided by PHP_CodeSniffer.

Test Plan: Wrote and executed unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9117
2014-05-16 19:26:55 -07:00
Joshua Spence
38eda3e86b Move getPEP8WithTextOptions method into ComprehensiveLintEngine class.
Summary: Since this method is only used within this class, it makes sense to move it here.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9114
2014-05-16 19:18:35 -07:00
epriestley
75cb3cf358 Fix arc diff --raw when run outside a repository
Summary: Fixes T5071. If you run `arc diff --raw` from some arbitrary, non-repository directory we incorrectly try to read information out of the working copy. Even if this information is available, `arc diff --raw` should not assume it's accurate (there's no guarantee the diff comes from the working copy).

Test Plan: Ran `arc diff --raw` in an arbitrary directory.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5071

Differential Revision: https://secure.phabricator.com/D9142
2014-05-15 19:03:29 -07:00
Vihang Mehta
6c6035d04b Add Closure linter to arcanist
Summary:
Found https://secure.phabricator.com/D4519 but it was horribly out of date, so decided to write a new version.
Kinda clobbered together form that diff and the new version of ArcanistJSHintLinter

Test Plan: Tested on personal projects with js files.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9131
2014-05-15 09:19:28 -07:00
James Rhodes
fcdacc28b8 Fix issue where message contained % but wasn't intended for use with parameters
Summary: This fixes an issue with the C# linter where a message could be returned from cslint that wasn't intended for use with parameters.  This just ensures there's enough parameters so that it won't crash (and consequently ignore lint messages).

Test Plan: Ran the linter, it didn't crash.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9116
2014-05-14 17:11:45 -07:00
Joshua Spence
d484b60295 Minor improvements to the ArcanistLintCheckstyleXMLRenderer class.
Summary: Ref T4948. Move the `startDocument` code to a `renderPreamble` function so that, at least theoretically, the renderer can be reused. Otherwise, the only way to reuse the renderer would be to construct a new instance.

Test Plan: Ran `arc lint --output xml` and verified that the output looked reasonable.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4948

Differential Revision: https://secure.phabricator.com/D9108
2014-05-13 17:32:49 -07:00
Joshua Spence
b744ed9a19 Be more strict with the type of .arclint properties.
Summary: Although this provides less context in terms of the error message (for example, `Parameter has invalid type. Expected type 'optional regex|list<regex>', got type 'list<string>'.`), I think that it is the right approach. I think that `PhutilTypeSpec::checkMap` should be improved such that additional context is provided in the exception message.

Test Plan: Ran `arc lint`. Modified `.arclint` to contain an invalid regex and ran `arc lint` again.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9089
2014-05-13 15:17:56 -07:00
Joshua Spence
79285208c4 Don't prompt for patches when outputting lint results as XML.
Summary: The Checkstyle XML output format is not intended to be an interactive workflow.

Test Plan: Introduced linter issues and ran `arc lint`. Verified that no interactive prompt was shown.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9107
2014-05-13 14:40:27 -07:00
Joshua Spence
ec3de41684 Support Checkstyle as an output format for lint results.
Summary: Fixes T4948. Add a lint renderer which supports outputting the lint results in the Checkstyle XML format.

Test Plan: Ran `arc lint --xml` and inspected the output.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4948

Differential Revision: https://secure.phabricator.com/D9083
2014-05-13 13:20:29 -07:00
epriestley
85b6c581e1 Read 'phabricator.uri' and 'default' out of more config sources
Summary: We have old/inconsistent code for reading these. Instead, read from sources in a modern way.

Test Plan:
  - Removed "default" and "phabricator.uri" from user/local/project config.
  - Set "default" in "/etc/arcconfig".
  - Ran `arc tasks` and got a "connect to Phabricator" message.

Reviewers: btrahan, davedash

Reviewed By: davedash

Subscribers: davedash, epriestley

Differential Revision: https://secure.phabricator.com/D9105
2014-05-13 11:36:56 -07:00
Joshua Spence
d826bf65c6 Minor cleanup of linter testing code.
Summary:
Just some minor cleaning up, including:

- Removing old annotations for Diviner.
- Renaming some `lint-test` files so that the directory name bears a closer resemblance to that of the linter.
- Remove some useless `return` statements.

Test Plan: `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9096
2014-05-13 06:16:02 -07:00
Joshua Spence
c4c0fbd7cd Rename test method.
Summary: Rename this test method for consistency with other linter test classes.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9095
2014-05-13 05:44:32 -07:00
epriestley
abafef7fb6 Write waiting message to stderr, not stdout. 2014-05-12 17:27:19 -07:00
William R. Otte
d5d8086646 Fixed the error message when cppcheck isn't installed to not be completely wrong.
Summary: Arcanist is a dirty rotten liar.  I made it less of a dirty, rotten liar.

Test Plan: http://imgur.com/36qXcgI

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9081
2014-05-12 12:58:03 -07:00
epriestley
0c21afa08a Print out a "waiting on stdin" message from 'arc call-conduit'
Summary: It looks like this command is just hanging if you skim the documentation and miss that you have to echo parameters into it. Print out a hint.

Test Plan: Ran `arc call-conduit` and got a hint.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9050
2014-05-12 11:36:19 -07:00
Joshua Spence
9b05a025b7 Made some additional methods of ArcanistLinter and ArcanistExternalLinter final
Summary: To me, it seems that these methods should never be overwritten in subclasses.

Test Plan: `arc unit`

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: aran, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D7958
2014-05-12 09:49:45 -07:00
epriestley
0583b39bb0 Minor tweaks for XHPAST config
Summary: Ref T2039. The type specs are right in theory but not quite correct in practice, since we pass strings in rather than objects.

Test Plan: While tweaking `phabricator/`, adjusted these to get desirable results.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9071
2014-05-12 05:06:14 -07:00
epriestley
7bbafe91d2 Fill out some more info functions for libphutil-specific linters
Summary: Ref T2039. It looks like "phutil-library" didn't make it over, I'll add that to the other two (unless I'm wrong and this isn't an oversight?).

Test Plan: Used `arc linters` to read help.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9070
2014-05-12 05:06:04 -07:00
Joshua Spence
be803ce577 Remove the getConfig and setConfig method.
Summary: It seems that there is a lot of overlap between `getConfig` / `setConfig` and `getLinterConfigurationOptions` / `setLinterConfigurationValue` respectively.

Test Plan: `arc lint` and `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9067
2014-05-12 04:46:56 -07:00
Joshua Spence
1b820dbb14 Allow ArcanistPhutilXHPASTLinter to be configured from .arclint.
Summary: Currently, `PhabricatorLintEngine` configures the `ArcanistPhutilXHPASTLinter` linter. In order to use `.arclint` instead, we need to expose the `ArcanistPhutilXHPASTLinter` configuration to the `.arclint` format.

Test Plan: See D9064.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9066
2014-05-12 04:46:41 -07:00
Joshua Spence
c4ac8a1aea Make the PhutilLintEngine final.
Summary:
Phabricator now uses the `ArcanistConfigurationDrivenLintEngine` lint
engine instead of the `PhabricatorLintEngine` lint engine.

Depends on D9064.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9069
2014-05-12 04:31:03 -07:00
Joshua Spence
315314425e Modernize ArcanistCppcheckLinter.
Summary: Ref T2039. Make the `ArcanistCppcheckLinter` compatible with `.arclint`.

Test Plan: Wrote and executed unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9068
2014-05-12 04:30:36 -07:00
epriestley
54c377448d Provide arc linters --verbose to list all available options
Summary:
Ref T2039. I'll update the corresponding documentation.

It feels a little awkward that this is disconnected from `getLinterConfigurationOptions()`, but I dislike returning weird ad-hoc structures more than I dislike having two methods. Most linters don't implement either of these anyway.

Test Plan: Ran `arc linters` and `arc linters --verbose`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9062
2014-05-11 20:23:07 -07:00
epriestley
b6ccfd4ef5 Add some example .arclint files to un-lie the pending documentation
Summary: Ref T2039. Provide some examples to help users figure out how to write these things.

Test Plan: Checked them with `jsonlint`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9065
2014-05-11 20:22:57 -07:00
Joshua Spence
b63828a87e Use the ArcanistConfigurationDrivenLintEngine as a linting engine.
Summary: Ref T2039. The `.arclint` file is reasonably complete now and we should start using it if possible, since we are trying to recommend it to others.

Test Plan: `arc lint`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9057
2014-05-11 19:33:40 -07:00
epriestley
86cbcb9f56 Allow linters to share resources by shoving them on the Engine
Summary:
Currently, the Phutil XHPAST Linter and vanilla XHPAST Linter reuse the same parse tree, but do this by having explicit knowledge of one another.

Instead, let them synchronize by writing to a glorified array of globals on the Engine. They no longer require knowledge of one another, so this can work under `.arclint`.

(This could probably be a little cleaner by putting more logic in the shared base class, but Facebook has some kind of goofy subclass of this thing and //this// patch won't disrupt it, while a cleaner one might.)

This should unblock D9057.

Test Plan: Ran unit tests and normal lint, got accurate looking results without duplicate invocations showing up in `--trace`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9059
2014-05-11 19:28:46 -07:00
Joshua Spence
9bd740b1f8 Remove severity options from some linters.
Summary: The `ArcanistGeneratedLinter` and `ArcanistNoLintLinter` don't actually ever raise any linter messages, so it doesn't make sense to set custom severities for these linters. Instead, don't expose this configuration.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9038
2014-05-11 19:28:27 -07:00
epriestley
7870e7f2e4 Warn when accessing deprecated lint config
Summary:
Ref T2039. Addresses two issues:

  - Issues a warning for use of config which is deprecated by `.arclint`.
  - We no longer require an engine to be present for these linters, so `arc linters` doesn't fatal if they aren't configured.

Test Plan:
  - Ran `arc linters` in a repo with no JSHint.
  - Ran `arc linters` in a repo with junk in .arcconfig and got a warning when it was read. Verified it still took effect.

Reviewers: chad, btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9058
2014-05-11 18:39:28 -07:00
Juan Pablo Civile
377c585752 Allow linters that extend ArcanistExternalLinter to customize the file parameter
Summary: Not all linters run on a `command file` fashion. In particular, the maven checkstyle plugin runs like `command --flag=file`.

Test Plan: Run a linter that extends `ArcanistExternalLinter`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9026
2014-05-11 16:27:23 -07:00
epriestley
5d1f87a8c2 Provide more help text for arc linters
Summary: Ref T2039. This isn't exhaustive, but moves things forward by a decent chunk.

Test Plan: Used `arc linters` and read the messages.

Reviewers: chad, btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9056
2014-05-11 16:16:45 -07:00
epriestley
e13f5839d4 Add 'arc linters' to list available linters and status
Summary: Ref T2039. We're starting to get kind of a lot of linters; provide `arc linters` to help users review and understand them and construct `.arclint` files.

Test Plan: {F152205}

Reviewers: btrahan, joshuaspence

Reviewed By: btrahan, joshuaspence

Subscribers: epriestley

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9041
2014-05-11 13:42:56 -07:00
Joshua Spence
c4985ef415 Allow global excludes to be specified in .arclint.
Summary: Currently, paths to be excluded from linting need to be specified for each linter individually. This is a pain for projects that are using even a moderate number of linters and which have common paths which should be excluded from linting completely.

Test Plan: Unfortunately, it's hard to test this sort of stuff. I cloned the `arclint-examples` repository and tested my changes there,

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9054
2014-05-11 05:32:38 -07:00
Joshua Spence
48c67d9c15 Minor formatting changes to ArcanistSpellingDefaultData.
Summary:
Fixed a few minor nitpicks:

  - Fix indentation.
  - Change double quotes to single quotes.
  - Add trailing commas to arrays.

Test Plan: Meh.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9053
2014-05-11 05:25:47 -07:00
Joshua Spence
20a0559522 Use PHP type hinting in ArcanistXHPASTLinter.
Summary: Explicitly specify the types of the function parameters. This change is basically the same as D8388.

Test Plan: `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9040
2014-05-10 01:56:06 -07:00
Joshua Spence
edd85a0e9d Modernize ArcanistMergeConflictLinter.
Summary: The only real change here is adding a `getLinterConfigurationName` method so that this linter can be used with an `.arclint` file. Everything else is just some minor tidying.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9039
2014-05-10 01:55:47 -07:00
Joshua Spence
2dba2f8528 Remove some dead comments.
Summary: These comments are redundant now.

Test Plan: N/A

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9037
2014-05-10 01:53:21 -07:00
Joshua Spence
89de113787 Add --quiet flags to the ArcanistCSSLintLinter.
Summary: This isn't really necessary, nor does it bear any significant benefits, however semantically it seems to make sense. From `csslint --help`, the `--quiet` flag causes `csslint` to "Only output when errors are present".

Test Plan:
Tested using `csslint` directly:

```
> csslint test.css

csslint: No errors in /home/joshua/workspace/github.com/facebook/arcanist/foo.css.
> csslint --quiet test.css
```

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9036
2014-05-10 01:52:57 -07:00
Joshua Spence
d80468bf81 Make the methods of ArcanistBaseXHPASTLinter final.
Summary: No subclass should need to override these methods. Additionally, none currently do.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9035
2014-05-10 01:51:44 -07:00
Joshua Spence
3d5aa332fe PHPCS supports reading from stdin.
Summary: PHPCS does actually support reading data from stdin, so let's make `ArcanistExternalLinter` aware of this.

Test Plan: `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9034
2014-05-10 01:50:43 -07:00
Joshua Spence
4a1b8a3299 Modernize ArcanistCpplintLinter.
Summary: Convert the `cpplint.py` wrapper linter to `ArcanistExternalLinter`. This is in preparation for T2039.

Test Plan: `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9033
2014-05-10 01:32:53 -07:00
Phil Frost
88bb9909b9 Allow .arclint to configure max line length of text linter
Test Plan:
Verified manually. Something like this in .arclint:

  "linters" : {
    "text" : {
      "type" : "text",
      "include" : "(\\.(txt|py|html?)$)",
      "text.max-line-length": 200
    }

changes the line length. Something other than an integer there raises an error.

Reviewers: epriestley, #blessed_reviewers, #arcanist

Reviewed By: epriestley, #blessed_reviewers, #arcanist

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D9029
2014-05-09 11:31:58 -07:00
epriestley
441e516104 Don't call writeLogLog. Just writeLog will do.
Test Plan: Ran `arc lint` locally. Now it doesn't exit with an error.

Reviewers: #blessed_reviewers, #arcanist, epriestley

Reviewed By: #blessed_reviewers, #arcanist, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9028
2014-05-09 10:22:50 -07:00
Joshua Spence
4298b4ea8b Remove debug key from .arclint file format.
Summary: Having a `debug` key in the `.arclint` file format doesn't seem right. Instead, it would be better to just use a `PhutilConsole` and the `writeLog` method so that "debug" messages are output when using `arc --trace`.

Test Plan: Ran `arc lint --trace` in a repository using `.arclint`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9021
2014-05-09 06:00:36 -07:00
Joshua Spence
1591b21e86 Fix a typo.
Summary: The `lessc` binary is a part of the NPM `less` module.

Test Plan: `npm install less` works whereas `npm install lessc` does not.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9006
2014-05-08 07:39:02 -07:00