diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..0b591ed
--- /dev/null
+++ b/.gitattributes
@@ -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
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b35dd41..a9d52cc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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 `
`, 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:
diff --git a/docs/style.md b/docs/style.md
index c941617..2432d71 100644
--- a/docs/style.md
+++ b/docs/style.md
@@ -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 `
`, 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).
diff --git a/script/lint b/script/lint
index f17004b..ad9ad24 100755
--- a/script/lint
+++ b/script/lint
@@ -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