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

Package declaration doesn't match source file location #4635

Closed
rocketraman opened this issue Mar 15, 2022 · 4 comments
Closed

Package declaration doesn't match source file location #4635

rocketraman opened this issue Mar 15, 2022 · 4 comments
Labels

Comments

@rocketraman
Copy link
Contributor

Expected Behavior of the rule

A file package declaration may not match with the location of the file in the source tree. This rule would trigger in that situation.

Context

Ensure package declarations match the physical location of the file.

IDEA flags this with:

"Package declaration does not match the source location".

@rocketraman rocketraman changed the title File package doesn't match file location Package declaration doesn't match source file location Mar 15, 2022
@marschwar
Copy link
Contributor

Do you mean something like InvalidPackageDeclaration?

@rocketraman
Copy link
Contributor Author

Aha, yes! Is there a reason that rule is not active by default?

@BraisGabin
Copy link
Member

I think that the only reason is that all the rules at detekt starts disable by default so we can get feedback about the rule and tune it before we enable it by default. I think that, for 1.21 we could check all our rules and enable some of them by default, for example, this one. I'm going to close this issue and open a new one to grab feedback about which rules should we enable.

@BraisGabin
Copy link
Member

BraisGabin commented Mar 19, 2022

For reference: #4643

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

No branches or pull requests

3 participants