Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[build] Added 'lint' Make target - #5411

Merged
brunoabinader merged 1 commit into
masterfrom
brunoabinader-lint
Jul 1, 2016
Merged

brunoabinader merged 1 commit into
masterfrom
brunoabinader-lint

Conversation

@brunoabinader

Copy link
Copy Markdown
Contributor

Introduce a new Makefile target named lint - it is meant to run both clang-tidy and clang-format checks only on modified code from your local branch.

Example:

  1. Rachel has a local branch named new-feature, which tracks origin/master.
  2. Rachel commits all her code changes and wants to check lints and code formatting issues.
  3. Rachel runs make lint and if there any changes made by either clang-tidy or clang-format, Rachel reviews and applies the changes before submitting upstream.

Caveats:

Fixes #5342.

👀 @mapbox/gl

@brunoabinader

Copy link
Copy Markdown
Contributor Author

Note: We might want to disable clang-format checks before doing a one-time run on all source code.

@brunoabinader

Copy link
Copy Markdown
Contributor Author

Per conversation with @tmpsantos - I'll rename the current check target to coverage, and use check instead of lint for this new proposed target.

Comment thread Makefile Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if compdb is not a dep of lint-linux, running make lint-linux could fail no?

@brunoabinader brunoabinader Jul 1, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We shouldn't need to call make lint-linux directly - make lint is smart enough to trigger its platform-specific variant.

@brunoabinader
brunoabinader merged commit da863c6 into master Jul 1, 2016
@brunoabinader
brunoabinader deleted the brunoabinader-lint branch July 1, 2016 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants