Commit graph

431 commits

Author SHA1 Message Date
Henrik Lissner
0b07264619 dev(ci): allow capitalization in revert commits
In case you're reverting an old commit, from before we adopted our git
conventions.
2021-10-06 01:30:45 +02:00
Henrik Lissner
5678a837dd fix(cli): void-variable comp-native-version-dir
There weren't enough checks that we were truly in a native-comp build of
Emacs. Not the most elegant solution, but the CLI rewrite handles this
far better so it'll do for now.

Fix #5131
2021-10-05 02:01:15 +02:00
Henrik Lissner
ea404dfa45 fix(cli): rebuilding packages on every 'doom sync' 2021-10-03 19:24:46 +02:00
Henrik Lissner
328a145ffd fix(cli): void-variable comp-native-version-dir on 'doom purge'
This error would trigger on Emacs 28 (without native-comp).

Fix #5131
2021-10-03 12:08:42 +02:00
Henrik Lissner
49c94dc78c docs(ci): document doom-cli-commit-rules 2021-09-30 15:06:34 +02:00
Henrik Lissner
e9b13393eb dev(ci): fix commit linter receiving empty summary
split-string is not side-effect free. It changes the match data (it uses
regexp to split strings).
2021-09-30 15:06:34 +02:00
Henrik Lissner
1cbd1e14e1 dev(ci): fix commit hash length linter
- Now counts and reports all commit references that aren't the correct
  length, not just the first.
- Now reports all incorrect references, not just the first on each line.
2021-09-29 18:26:10 +02:00
Henrik Lissner
002711ff9b dev(ci): add pre-push git hook
To complain about lingering fixup/squash commits.
2021-09-26 14:35:53 +02:00
Henrik Lissner
dc3eb8a7cf dev(ci): ignore fixup!/squash!/wip commits
Otherwise the commit linter makes rebasing impossible without
--no-verify, or in magit if the git hooks are installed.
2021-09-26 14:35:53 +02:00
Henrik Lissner
2a0aa3d15b dev(ci): fix scope checker in commit linter
- Linter wasn't failing on any invalid scopes due to logic error.
- Linter was failing to recognize module categories as valid
  scopes (e.g. :lang, :ui, etc).
- Adds 'ci' and 'lib' as valid scopes.
2021-09-24 12:37:50 +02:00
Henrik Lissner
14729d21d1 dev(ci): refactor commit message reader for linter 2021-09-17 09:10:37 +02:00
Henrik Lissner
f80eed41bb dev(ci): fix linter complaining about git Ref lines
Such as Co-authored-by: and Signed-off-by: lines.
2021-09-17 09:10:14 +02:00
Henrik Lissner
5aeefc301b dev(ci): fix linter error on tail-less commit msg
If the commit message lacked the diff post-amble, 'doom ci
hook-commit-msg' would throw an out-of-range error.
2021-09-17 09:05:53 +02:00
Henrik Lissner
b3c01226a1 dev(ci): fix linter warning count 2021-09-17 09:05:42 +02:00
Henrik Lissner
650f7a82e3 dev(ci): refactor commit linter
A new approach to make linter rules more flexible.
2021-09-16 20:20:10 +02:00
Henrik Lissner
48239aeb97 fix(cli): git version check on Windows
Of course Git on Windows produces '2.33.0.windows.2'. Why wouldn't it?
2021-09-11 14:26:45 +02:00
Henrik Lissner
abc16ef68c refactor(cli): make all searches case-sensitive
This is more predictable, and is safe as a global default in CLI
sessions (but not in interactive ones). This indirectly fixes case
insensitivity in our commit linter rules.
2021-08-05 12:53:20 -04:00
Henrik Lissner
a3f917c42d dev: fix off-by-one for line length rule 2021-08-04 10:46:10 -04:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Henrik Lissner
3beff3133f dev: refactor, fix, and add rules to commit linter
- Conform commit linter to 50/72 rule
- Add linter rule for body line length; excludes the footer and lines
  with long URLs.
- Add linter rule for validating scopes are in lexical order.
- Add linter rule for validating footer refs.
  Footer references should reference one thing per line. That thing can
  be one of:
  - An URL.
  - An issue or PR reference (local or remote).
  - A 12-character commit hash (local or remote).
- Extend linter to detect new scopes for docs:
  - Commits of type 'docs' can now use these additional scopes (in
    addition to other possible scopes):
    - docs(install) -> for changes to our installation guide(s). It is
      expected for this to change so often that it has its own scope.
    - docs(X) -> where X is the basename of any org file in docs/*.org.
      e.g.
      - docs(index): ...
      - docs(modules): ...
      - docs(faq): ...
- Modify the scope checker to consider *any* parenthetical scope given
  for bump, revert, merge, module, or release commits to be invalid.
- Update bump commit linter for 12c hashes (see 3bedae38dd).
- Fix language in imperative ref linter warning.

Ref https://discourse.doomemacs.org/how2commit
Ref 3bedae38dd
2021-08-03 23:00:43 -04:00
Henrik Lissner
74f72c15b3 dev: fix commit linter target and lint all commits
- Was formerly processing the internal merge commit, which never conforms
  to our conventions, but is also unrelated to the work at hand.
- Now lints the range of commits applicable to the event, and not just
  the latest commit.
2021-08-02 15:00:53 -04:00
Henrik Lissner
5df31a4895 dev: fix and refactor commit lint rules
- Fix rules that weren't working due to faulty logic.
- Revise linter messages for clarity and concision.
- Use conventional commit nomenclature: summary -> subject
- case-fold-search = nil, to ensure case sensitive searches
- Exclude bump type from length checks
2021-08-01 23:37:36 -04:00
Henrik Lissner
11a0c0cbdb dev: add linter rule for commit capitalization
Bad:  'fix(abc): Prevent freezes'
Good: 'fix(abc): prevent freezes'
2021-08-01 23:37:36 -04:00
Henrik Lissner
5d1d0fc7c9 dev: add linter rule for Refs: in commit footer
+ No colon.
+ One ref per line.

Bad:
  Refs: A B C
  Ref: X Y
  Ref: Z
Good:
  Ref A
  Ref B
  Ref C
  Ref X
  Ref Y
  Ref Z
2021-08-01 23:37:36 -04:00
Henrik Lissner
3d423862d7 dev: add linter rules for module type
Recently added 'module' to our list of git commit types to represent
changes to our module list. These events are important enough to
Doom (and users) to track separately.
2021-08-01 11:43:01 -04:00
Henrik Lissner
345ff621c3 dev: link to gist for commit docs
Until the new docs are up, link to the gist.
2021-08-01 02:03:36 -04:00
Henrik Lissner
074b9eb0d1 dev: add commit linter workflow
Experimenting with an internal linter. Only trouble is, if Doom's CLI is
ever in a broken state, a contributor will have to know about
--no-verify option for git commit. This can be improved post CLI
rewrite.
2021-07-31 23:51:27 -04:00
Daanturo
bfc12b83b4 Black list XDG_SESSION_TYPE from doom-env
The variable is obsolete once we switch between "x11" and "wayland".
2021-07-30 08:14:48 +07:00
Itai Y. Efrat
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
Henrik Lissner
8ad846e15b Fix #5198: blacklist WSL_INTEROP in envvar file 2021-07-08 15:11:39 -04:00
Henrik Lissner
bd5327f9cc
Merge pull request #5235 from ErnestDong/develop
Filter directories when purging straight repos
2021-07-08 14:10:25 -04:00
Henrik Lissner
044a1a5f2b Drop Emacs 26.x support
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).

With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.

Also reverts bb677cf7a (#5232) as it is no longer needed.
2021-07-06 02:31:52 -04:00
ErnestDong
8c3a83526b Filter directories when purging straight repos
in macOS there is always an annoying ".DS_Store" in straight/repos,
which breaks `doom purge`
2021-07-05 15:06:54 +08:00
Itai Y. Efrat
f9a1d80936 cli/packages: fix update output on unpinned packages
- don't print output of git command
- count commits and output log
2021-06-04 15:23:25 +03:00
Itai Y. Efrat
46c89d350e cli/packages: fix commit between pins counting
the commit counting introduced in a3df5bf prints `nil` instead of the
empty string when the repo moves from commit A to commit B where A isn't
reachable from B
2021-06-04 15:23:15 +03:00
Henrik Lissner
1a5f4afd0d Reduce minimum required git to 2.23
Thanks to raxod502/straight.el@7ca94a7, which was included in 3329448bd.
This in particular reduces the burden for Ubuntu users.

Relevant to #5088, #5096
2021-06-01 16:08:17 -04:00
Henrik Lissner
a3df5bfa3e cli/packages: count commits between pins 2021-05-29 13:01:52 -04:00
Henrik Lissner
a600e5949b cli/env: blacklist TERMCAP envvar
May be the result of recent "Not a termcap device" error reports.
2021-05-28 13:39:14 -04:00
Henrik Lissner
f604ce6d01 Minor refactors & reformatting 2021-05-25 10:35:21 -04:00
Henrik Lissner
7b5baf319b Fix #5093: git version doctor check on macOS
git version's output is formatted differently on macOS (because of
course it is), so I use a more flexible check.
2021-05-25 10:35:21 -04:00
Henrik Lissner
592116cece cli/doctor: add git and git 2.28 check
Also:
+ Refactors hard dependency checks
+ Improve warnings for 26.x and 28.x users

Mentioned in #5088
2021-05-24 14:54:33 -04:00
Henrik Lissner
e5b52e2a50 Remove "fix" for projectile + $HOME git repos
There are legitimate reasons why a user would want to treat $HOME as a
project. 'doom doctor' now complains about this case in greater detail.
I'll leave it to users to deal with this edge case.
2021-05-23 22:09:07 -04:00
Henrik Lissner
3ba364ae10 Minor refactoring across the board 2021-05-23 22:09:07 -04:00
Henrik Lissner
a8e57438dc Refactor doom-{path,file,dir,glob}
Breaking change: doom-glob would formerly return a string (if only one
match) or a list. Now it always returns a list.
2021-05-23 21:49:02 -04:00
Henrik Lissner
13f316e645 Fix packages evading native-compilation
(featurep 'nativecomp) will never return t.
2021-05-23 21:49:02 -04:00
Henrik Lissner
4b5cf7d46f bin/doom: polish output
Reduces the amount of "noise" included in bin/doom's output.

Also fixes an issue where warnings during autoloads generation would
sneak into Doom's autoloads file, producing weird void-variable errors,
like

  (void-variable . rainbow-delimiters:)
  (void-variable . diredfl:)
  (void-variable . company:)
2021-05-23 21:49:02 -04:00
Hyunggyu Jang
fef242aa34 Fix bin/doom compile error introduced by e2a11d24fd
With a commit of e2a11d24fd, when it comes to
`doom compile`, modules aren't loaded anymore, which corrupts the compiling process.

What I did is just adding the necessity parts for the doom's byte compiler.
2021-05-12 14:08:51 +09:00
Henrik Lissner
b092d79d35 Fix reference to comp-deferred-compilation-deny-list 2021-05-12 00:50:17 -04:00
Henrik Lissner
6ad4f0698e Fix #4995: adapt to more renamed comp-* symbols
Two more variables were renamed upstream.
2021-05-11 19:03:18 -04:00
Henrik Lissner
62d2f27510 Fix references to comp-eln-load-path 2021-05-08 18:56:40 -04:00