diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-18 17:27:32 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-24 20:25:06 -0500 |
commit | 6555b68ca0678827b89c5624db071f5a485d18b7 (patch) | |
tree | 9dbcd231add48a179d7751606523865029d2fc1a /ghc.mk | |
parent | 06c18990fb6f10aaf1907ba8f0fe3f1a138da159 (diff) | |
download | haskell-6555b68ca0678827b89c5624db071f5a485d18b7.tar.gz |
Move linters into the tree
This MR moves the GHC linters into the tree, so that they can be run directly using Hadrian.
* Query all files tracked by Git instead of using changed files, so that we can run the exact same linting step locally and in a merge request.
* Only check that the changelogs don't contain TBA when RELEASE=YES.
* Add hadrian/lint script, which runs all the linting steps.
* Ensure the hlint job exits with a failure if hlint is not installed (otherwise we were ignoring the failure). Given that hlint doesn't seem to be available in CI at the moment, I've temporarily allowed failure in the hlint job.
* Run all linting tests in CI using hadrian.
Diffstat (limited to 'ghc.mk')
-rw-r--r-- | ghc.mk | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -546,13 +546,15 @@ utils/ghc-pkg/dist-install/package-data.mk: $(fixed_pkg_prev) utils/hsc2hs/dist-install/package-data.mk: $(fixed_pkg_prev) utils/compare_sizes/dist-install/package-data.mk: $(fixed_pkg_prev) utils/runghc/dist-install/package-data.mk: $(fixed_pkg_prev) -utils/notes-util/dist-install/package-data.mk: $(fixed_pkg_prev) utils/iserv/stage2/package-data.mk: $(fixed_pkg_prev) utils/iserv/stage2_p/package-data.mk: $(fixed_pkg_prev) utils/iserv/stage2_dyn/package-data.mk: $(fixed_pkg_prev) ifeq "$(Windows_Host)" "YES" utils/gen-dll/dist-install/package-data.mk: $(fixed_pkg_prev) endif +linters/linters-common/dist-install/package-data.mk: $(fixed_pkg_prev) +linters/lint-notes/dist-install/package-data.mk: $(fixed_pkg_prev) linters/linters-common/dist-install/package-data.mk +linters/lint-whitespace/dist-install/package-data.mk: $(fixed_pkg_prev) linters/linters-common/dist-install/package-data.mk # the GHC package doesn't live in libraries/, so we add its dependency manually: compiler/stage2/package-data.mk: $(fixed_pkg_prev) @@ -669,7 +671,6 @@ BUILD_DIRS += utils/hsc2hs BUILD_DIRS += utils/ghc-pkg BUILD_DIRS += utils/testremove BUILD_DIRS += utils/check-ppr -BUILD_DIRS += utils/notes-util BUILD_DIRS += utils/check-exact BUILD_DIRS += utils/count-deps BUILD_DIRS += utils/ghc-cabal @@ -679,6 +680,9 @@ BUILD_DIRS += ghc BUILD_DIRS += docs/users_guide BUILD_DIRS += utils/compare_sizes BUILD_DIRS += utils/iserv +BUILD_DIRS += linters/linters-common +BUILD_DIRS += linters/lint-notes +BUILD_DIRS += linters/lint-whitespace # ---------------------------------------------- # Actually include the sub-ghc.mk's @@ -1092,7 +1096,7 @@ BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindist.mk unix-binary-dist-prep: $(includes_dist-install_H_FILES_GENERATED) $(call removeTrees,bindistprep/) "$(MKDIRHIER)" $(BIN_DIST_PREP_DIR) - set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile m4 aclocal.m4 config.sub config.guess install-sh llvm-targets llvm-passes ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done + set -e; for i in packages LICENSE compiler ghc rts libraries linters utils docs libffi includes driver mk rules Makefile m4 aclocal.m4 config.sub config.guess install-sh llvm-targets llvm-passes ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK) echo "BUILD_SPHINX_HTML = $(BUILD_SPHINX_HTML)" >> $(BIN_DIST_MK) echo "BUILD_SPHINX_PDF = $(BUILD_SPHINX_PDF)" >> $(BIN_DIST_MK) |