mirror of
https://github.com/mas-cli/mas
synced 2024-11-24 04:23:09 +00:00
🧹 Use git diff --check
as another linter
This commit is contained in:
parent
05083da253
commit
fc33738f0f
4 changed files with 10 additions and 5 deletions
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Trailing spaces may be intentional in markdown documents, so these should not
|
||||
# be removed.
|
||||
# https://gist.github.com/shaunlebron/746476e6e7a4d698b373
|
||||
**/*.md whitespace=-blank-at-eol
|
|
@ -23,9 +23,7 @@ We love pull requests from everyone. By participating in this project, you agree
|
|||
`git checkout -b awesome-feature master`
|
||||
- Please avoid working [directly on the master branch](https://softwareengineering.stackexchange.com/questions/223400/when-should-i-stop-committing-to-master-on-new-projects).
|
||||
- Make commits of logical units.
|
||||
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
- Note that [two trailing spaces](https://gist.github.com/shaunlebron/746476e6e7a4d698b373) is intentional
|
||||
in markdown documents to create a line break like `<br>`, so these should _not_ be removed.
|
||||
- Run script/lint before committing your changes. Fix anything that isn't automatically fixed by the linters.
|
||||
- Push your topic branch to your fork and [submit a pull request](https://github.com/mas-cli/mas/compare/master...your-username:topic-branch).
|
||||
|
||||
Some things that will increase the chance that your pull request is accepted:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# All Files
|
||||
|
||||
- Remove unnecessary whitespace from the end of lines.
|
||||
- Use `git diff --check` to look for these before committing.
|
||||
- Use `script/lint` to look for these before committing.
|
||||
- Note that [two trailing spaces](https://gist.github.com/shaunlebron/746476e6e7a4d698b373)
|
||||
is intentional in markdown documents to create a line break like `<br>`, so these should _not_ be removed.
|
||||
- End each file with a [newline character](https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file#18789).
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
# script/lint
|
||||
# mas
|
||||
#
|
||||
# Linting checks for CI "Lint" stage.
|
||||
# Linting checks for development and CI.
|
||||
#
|
||||
|
||||
echo "==> 🚨 Linting mas"
|
||||
|
||||
echo "--> 🌳 Git"
|
||||
git diff --check
|
||||
|
||||
echo
|
||||
echo "--> 🕊️ Swift"
|
||||
swiftlint lint --strict
|
||||
|
|
Loading…
Reference in a new issue