-
Notifications
You must be signed in to change notification settings - Fork 4
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
False Negative mandatory-package
Check
#234
Comments
@yegor256 Could you have a look, please? |
@volodya-lombrozo I believe, |
@yegor256 It's legal to have empty package:
They are you words, actually: objectionary/jeo-maven-plugin#912 (comment) Thus, I don't have package for some objects, but |
@volodya-lombrozo it's legal, but it's better to have it (that's why it's a warning, not an error). Maybe you can use some global package for all objects in JEO, something like |
@yegor256 I believe it's better just to remove this check. We do have empty packages. It's perfectly legal. The absence of the package entry doesn't influence anything. It's not an anti-pattern and doesn't break anything. I don't see any reason for leaving the check. Moreover, please, pay attention, I don't have <metas>
<meta>
<head>version</head>
<tail>1.2.3</tail>
</meta>
</metas> If I would have <metas>
<meta>
<head>version</head>
<tail>1.2.3</tail>
</meta>
<meta>
<head>package</head>
<tail></tail>
</meta>
</metas> I would hardly agree (no) that it might be a warning. |
@volodya-lombrozo remember, the lints exist not only for XMIR checking, but mostly for EO programmers. We want them to be as disciplined as possible, that's why lints are as strict as we can make them. Having an object without a package means having it in the global scope of visibility (the entire "universe" should see it and use it). This is not a good idea. |
@yegor256 Maybe I can ignore this check somehow? I don't need this rule for XMIR checking. |
@volodya-lombrozo sure, you can add this and the rule will be ignored:
|
@yegor256 Since we can ignore this check, I believe we can close this issue. |
I have an XMIR file with the following meta:
I added it to handle mandatory-version check and immediately have got the following error:
It used to work well because if I had empty package I avoided adding
metas
at all. Now I have non-emptymetas
and empty package.objectionary/lints
complaints about it.Please remove this check or fix it. Otherwise, the checks conflicts with each other.
The text was updated successfully, but these errors were encountered: