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

Add help target to the makefile #10608

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

philderbeast
Copy link
Collaborator

Fix #10596. Add help for some of the makefile targets.

$ make help
all                            Build the Cabal libraries and cabal-install executables.
checks                         Run all local checks; whitespace, style, and lint.
doctest-install                Install doctest tool needed for running doctests.
doctest                        Run doctests.
exe                            Builds the cabal-install executables.
fix-whitespace                 Run fix-whitespace in fix mode.
ghcid-cli                      Run ghcid for the cabal-install executable.
ghcid-lib                      Run ghcid for the Cabal library.
help-banner                    Show the help banner.
help                           Show the commented targets.
init                           Set up git hooks and ignored revisions.
lib                            Builds the Cabal libraries.
lint-json                      Run HLint in JSON mode.
lint                           Run HLint.
style-commit                   Run the code styler on the previous commit.
style-modified                 Run the code styler on modified files.
style                          Run the code styler.
tags                           Generate editor tags, vim ctags and emacs etags.
users-guide                    Build the users guide.
users-guide-requirements       Install the requirements for building the users guide.
whitespace                     Run fix-whitespace in check mode.

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

Makefile Outdated Show resolved Hide resolved
@philderbeast
Copy link
Collaborator Author

Label merge+no rebase is necessary when the pull request is from an organisation.

@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Nov 29, 2024
- Add comments for users-guide* targets
- Comment tags target
- Add comment for checks
- Comment doctesting and ghcid
- Add help-banner target
- Add comments to all, lib and exe targets
- Add full stops to the help comments
- Manual fix-whitespace
@philderbeast
Copy link
Collaborator Author

philderbeast commented Dec 2, 2024

The help after #10603 was merged to master.

Tip

Should we switch from prefix/infix to suffix for fix, from -fix-* to *-fix, for the fixing targets?

@geekosaur, you chose the prefix name for fix-whitespace in 2858dc0 and that matches the tool name. On the other hand the lexical grouping works better with a suffix.

$ make help
  all                            Build the Cabal libraries and cabal-install executables.
  checks                         Run all local checks; whitespace, typos, style, and lint.
  doctest-install                Install doctest tool needed for running doctests.
  doctest                        Run doctests.
  exe                            Builds the cabal-install executables.
- fix-whitespace                 Run fix-whitespace in fix mode.
  ghcid-cli                      Run ghcid for the cabal-install executable.
  ghcid-lib                      Run ghcid for the Cabal library.
  help-banner                    Show the help banner.
  help                           Show the commented targets.
  init                           Set up git hooks and ignored revisions.
  lib                            Builds the Cabal libraries.
  lint-json                      Run HLint in JSON mode.
  lint                           Run HLint.
- markdown-fix-typos             Fix typos in markdown files
  markdown-typos                 Find typos in markdown files
+ markdown-typos-fix             Fix typos in markdown files
  style-commit                   Run the code styler on the previous commit.
  style-modified                 Run the code styler on modified files.
  style                          Run the code styler.
  tags                           Generate editor tags, vim ctags and emacs etags.
  typos-install                  Install typos-cli for typos target using cargo
  users-guide                    Build the users guide.
- users-guide-fix-typos          Fix typos in users guide
  users-guide-requirements       Install the requirements for building the users guide.
  users-guide-typos              Find typos in users guide
+ users-guide-typos-fix          Fix typos in users guide
  whitespace                     Run fix-whitespace in check mode.
+ whitespace-fix                 Run fix-whitespace in fix mode.  

@geekosaur
Copy link
Collaborator

There's also DevX vs. what makes the help text look better.

@philderbeast
Copy link
Collaborator Author

philderbeast commented Dec 2, 2024

One thing I hadn't noted earlier is the number of groups with a common prefix that we have already:

  • doctestdoctest + doctest-install
  • ghcidghcid-cli + ghcid-lib
  • lintlint + lint-json
  • stylestyle + style-commit + style-modified
  • users-guideusers-guide + users-guide-requirements

We have could have common suffixes too; -install, -check and -fix.

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Dec 4, 2024
@mergify mergify bot merged commit daa6ffa into haskell:master Dec 4, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge+no rebase ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Self-document the makefile
3 participants