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
ci(fix): Normalize for .gitattributes
+ improve eclint
coverage
#3566
Merged
georglauterbach
merged 6 commits into
docker-mailserver:master
from
polarathene:ci/fix-eclint-config
Oct 4, 2023
Merged
ci(fix): Normalize for .gitattributes
+ improve eclint
coverage
#3566
georglauterbach
merged 6 commits into
docker-mailserver:master
from
polarathene:ci/fix-eclint-config
Oct 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`postfix-accounts.cf` in particular had a mix of `CRLF` and `LF`.
Better align with the `.editorconfig` files rules (_which `eclint` reads_). Most of this is the upstream defaults and can be dropped. - `SpaceAftertabs` (_possibly invalid name?_) was set to `true` but it doesn't appear any files covered rely on this. No context in `git blame` for it's addition, dropping. - `Exclude` has a long history of pattern additions with minimal context. This is updated to be more specific now. - `IgnoreDefaults` has been left for visibility. It could technically be set to `true`, but the SVG files should be ignored then. `test/test-files/` is only ignored due to an upstream bug with `eclint` incorrectly detecting a file with the wrong encoding and triggering a failure as it's unsupported by `eclint`. Can be removed once a new release resolves that. `test/bats/` and it's related submodules `bats-assert` / `bats-support` need to be ignored. In addition to not being relevant to the project, they supply their own `.editorconfig` with rules that seem to fail such as `max_line_length`. `.git/` also isn't ignored by default (_it apparently was in an earlier version of `eclint` according to a bug report_).
We can bring the `indent_size = 2` rule into all files default. It helps establish a bit of consistency in the project files. `.gitmodules` could possibly be ignored instead, it's also using tabs like `Makefile` so I've just configured that explicitly here. The git submodules section doesn't seem relevant? Those changes shouldn't be committed, and we're not likely to modify those intentionally. The project supplies it's own `.editorconfig` file as root which would ignore this section, thus it's not really serving a purpose?
Most changes are for the `indent_size = 2` rule now having expanded relevance. 1 file needed a blank line `dovecot-master-accounts.md`, another had trailing white-space `mail_with_ldap.bats`.
Just white-space changes with indentation to be multiples of 2, and replace any tabbed indentation with spaces.
This has not been used since the switch to `supervisord`.
polarathene
added
area/ci
service/security/postgrey
area/tests
area/configuration (file)
kind/bug/fix
A fix (PR) for a confirmed bug
labels
Oct 3, 2023
Documentation preview for this PR is ready! 🎉 Built with commit: 84acba2 |
georglauterbach
approved these changes
Oct 4, 2023
If my PR is accepted, editorconfig-checker/editorconfig-checker#252 will be fixed soon. @polarathene Thank you for the detailed error report and your patience. |
This was referenced Oct 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/ci
area/configuration (file)
area/tests
kind/bug/fix
A fix (PR) for a confirmed bug
priority/high
service/security/postgrey
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a follow-up PR to #3527
contributors.yml
(_due to files withCRLF
conflicting with.gitattributes
_) #3565 some files needed to fixed that had already been committed prior to fix: Ensure files are committed witheol=lf
via.gitattributes
#3527 , which was causing ourcontributors.yml
workflow to fail.linting.yml
+make eclint
, I've revised the.editorconfig
+.ecrc.json
config files to be better aligned and provide improved coverage. Various files have been slightly modified to reflect the ECLint detected issues.Postgrey had an init script contributed in Feb 2017 as part of the feature implementation.
.init$
rule.supervisord
which made that redundant (we just call it directly with options here now), so I've dropped the file./etc/default/postgrey
file, which AFAIK isn't supporting anything either and we could drop it (seems to just be a single ENV used by the init script for adding extra options 🤷♂️ ). A later PR in 2018 added Postgrey support for whitelisting.postsrsd
integration has migrated from aninit
script of it's own, while still loading/etc/default/postsrsd
config in it's supervisord command. Postgrey could adopt something similar if worthwhile, although I think we plan to deprecate this service for removal sometime next year? 🤔Additional context between the two files that have meaningful changes
.ecrc.json
and.editorconfig
can be found in the commit messages of their individual commits.For reference:
eclint
configuration is here.eclint
excludes are listed here.test/test-files
is ignored, but it could be for the specific file affected if preferred. The failure is due to this upstreameclint
bug. I've pinpointed the cause and deferred the fix to maintainers there.Fixes #3565
Type of change
Checklist: