-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add FileMustStartWithPackageStatement check #139
Add FileMustStartWithPackageStatement check #139
Conversation
1e03f00
to
e5206e3
Compare
If no package is specified, it uses Also, if you enforce specifying the package, shouldn't the package statement be at the top? Now it would be okay to place it somewhere in the middle, having any code before the package statement being added to/executed in the default package, and the code after the statement being added to/executed in that package. You can even add the package statement to the end of the file, the check will accept it. I'm okay with adding a check like this, however! Just needs a bit more work. |
That is true, although if you loaded file A (using
I agree with the improvement that this check should enforce the first code-statement should be a package statement (comments are okay of course).
Thanks! |
...s/src/main/java/nl/ramsolutions/sw/magik/checks/checks/FileWithoutPackageStatementCheck.java
Outdated
Show resolved
Hide resolved
...rc/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/FileWithoutPackageStatement.json
Outdated
Show resolved
Hide resolved
...s/src/main/java/nl/ramsolutions/sw/magik/checks/checks/FileWithoutPackageStatementCheck.java
Outdated
Show resolved
Hide resolved
...rc/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/FileWithoutPackageStatement.json
Outdated
Show resolved
Hide resolved
Thanks! |
No description provided.