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

Nested swiftlint.yml disables top level Custom Rules. #1486

Closed
aaroncrespo opened this issue May 2, 2017 · 3 comments
Closed

Nested swiftlint.yml disables top level Custom Rules. #1486

aaroncrespo opened this issue May 2, 2017 · 3 comments
Labels
duplicate Issues that already exist in other terms.

Comments

@aaroncrespo
Copy link
Contributor

Given the following layout:

Root
├── .swiftlint.yml (with custom rule)
├── Source.swift
└── Tests
    ├── .swiftlint.yml
    └── Tests.swift

A custom rule defined in the top level .swiftlint.yml will not run if the nested .swiftlint.yml is present. Removing the nested config allows the custom rule to run (but I need a nested config)

I using the sample custom Rule from the readme.

@marcelofabri
Copy link
Collaborator

Duplicate of #676?

@aaroncrespo
Copy link
Contributor Author

makes sense, the violations I am trying to catch are in my Tests. but it would be replaced by the nested swiftlint yml

@marcelofabri
Copy link
Collaborator

Closing this then. For now, you'd either have to avoid nested configs or duplicate the custom_rules 😬

@marcelofabri marcelofabri added the duplicate Issues that already exist in other terms. label May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues that already exist in other terms.
Projects
None yet
Development

No branches or pull requests

2 participants