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

Ability to hide generation header #1385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilia3546
Copy link

This PR adds ability to disable header in generated files

Problem

If you use SwiftLint rule "file_name", then you will catch "File Name Violation" errors/warnings for each generated file. Even if you have "swiftlint:disable all" after header.

Also we have swiftlint rule for file header pattern "file_header" which also throws a warning :(

Screenshot 2024-11-22 at 17 46 51

Solution

I found a similar problem in the SwiftLint repo - realm/SwiftLint#2277. Users suggest to add this line at the beginning of the file (at 0 line) // swiftlint:disable:this file_name.

But at the moment this line contains header comment // Generated using Sourcery .... And I thought that if we be able to hide header and add to template // swiftlint:disable:this file_name, then we could solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant