ci(fix): Normalize for .gitattributes + improve eclint coverage#3566
Merged
georglauterbach merged 6 commits intodocker-mailserver:masterfrom Oct 4, 2023
Merged
Conversation
`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`.
Contributor
|
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 withCRLFconflicting with.gitattributes_) #3565 some files needed to fixed that had already been committed prior to fix: Ensure files are committed witheol=lfvia.gitattributes#3527 , which was causing ourcontributors.ymlworkflow to fail.linting.yml+make eclint, I've revised the.editorconfig+.ecrc.jsonconfig 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.supervisordwhich made that redundant (we just call it directly with options here now), so I've dropped the file./etc/default/postgreyfile, 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.postsrsdintegration has migrated from aninitscript of it's own, while still loading/etc/default/postsrsdconfig 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.jsonand.editorconfigcan be found in the commit messages of their individual commits.For reference:
eclintconfiguration is here.eclintexcludes are listed here.test/test-filesis ignored, but it could be for the specific file affected if preferred. The failure is due to this upstreameclintbug. I've pinpointed the cause and deferred the fix to maintainers there.Fixes #3565
Type of change
Checklist: