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

docs: Added information on how to run the linter. #7534

Closed
wants to merge 6 commits into from

Conversation

diosney
Copy link
Contributor

@diosney diosney commented Jul 4, 2016

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Right now there is no information in the building & testing docs on how to run the linter directly, which is useful so it can save time and separate tasks if one is checking only code style instead of checking the whole test suite.

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jul 4, 2016
@@ -150,6 +150,12 @@ $ ./configure && make -j8 test
Make sure the linter is happy and that all tests pass. Please, do not submit
patches that fail either check.

You can check if the linter is happy by running:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I’d note that the linter is usually run as part of make test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax Agree, but if the tests are throwing errors that will disable you to properly lint the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diosney Yep, I’ve seen the thread that prompted this PR, and I’m in favour of having the information of how to run only the linter noted here – I’d just want to save folks the trouble of thinking they have to run the linter separately under normal circumstances.

I don’t feel too strongly about it, and if you want to keep it this way, I won’t be in the way of that. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax Oy! I think I understand you now! I just though you didn't see this addition as useful. Sorry for that.

I will add your proposal right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax Just added your proposal, can you check it? Thanks!

@addaleax
Copy link
Member

addaleax commented Jul 4, 2016

LGTM, thanks!

@jasnell
Copy link
Member

jasnell commented Jul 4, 2016

LGTM

@Trott
Copy link
Member

Trott commented Jul 4, 2016

LGTM. A few nits that can be ignored or dealt with:

  • I don't think linting is relevant to the BUILDING.md doc. So that change seems unnecessary.
  • test it directly might be better as run it directly since it is being contrasted with running tests.
  • Maybe mention that the linter won't run if any tests failed, since that was the particular gotcha that resulted in this PR. Ideally, there shouldn't be any failed tests, but if there are and you want to run the linter separately, here's how to do it...

@diosney
Copy link
Contributor Author

diosney commented Jul 5, 2016

@Trott

[x] Removed: I don't think linting is relevant to the BUILDING.md doc. So that change seems unnecessary.

[x] Changed: test it directly might be better as run it directly since it is being contrasted with running tests.

[x] Added: Maybe mention that the linter won't run if any tests failed, since that was the particular gotcha that resulted in this PR. Ideally, there shouldn't be any failed tests, but if there are and you want to run the linter separately, here's how to do it...

Can you review the new changes?

@cjihrig
Copy link
Contributor

cjihrig commented Jul 5, 2016

LGTM

@diosney
Copy link
Contributor Author

diosney commented Jul 5, 2016

Sorry, reworded line. Tell me if is OK now.

@Trott
Copy link
Member

Trott commented Jul 5, 2016

LGTM as is. Final nit (which as always, you can ignore): I would go with wording like this:

Running make test will run the linter as well unless one or more tests fail. If you want to run the linter without running tests, you can use make lint.

This fixes a few very minor things (e.g., consistent verb tense). However, if there are reasons to prefer the current wording, that's fine.

@diosney
Copy link
Contributor Author

diosney commented Jul 5, 2016

@Trott NP, changed to fix your nit.

@Trott
Copy link
Member

Trott commented Jul 5, 2016

I know I said "final nit" before and I know this little bit is text I wrote, but I forgot that we try to avoid personal pronouns. So post-final nit: Get rid of you can, so:

you can use make lint

to

use make lint

Once again, with or without this change, LGTM!

@diosney
Copy link
Contributor Author

diosney commented Jul 6, 2016

@Trott NP, I think this is how code review and PR moderating should be when a lot of people is contributing to the same project.

Fixed first post-final nit, expecting a post-post-final nit to be reported 😄

BTW, can you take a look at #7527 nit-wise?

@Trott
Copy link
Member

Trott commented Jul 6, 2016

LGTM :shipit:

@addaleax
Copy link
Member

Landed in fa46e50, thanks!

@addaleax addaleax closed this Jul 10, 2016
addaleax pushed a commit that referenced this pull request Jul 10, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas pushed a commit that referenced this pull request Jul 15, 2016
Added clarification about the linter execution.

PR-URL: #7534
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants