-
Notifications
You must be signed in to change notification settings - Fork 581
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
AnnotationBear: Allow missing language setting #1100
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! Reviewing pull requests take really a lot of time and we're all volunteers. Please make sure you go through the following check list and complete them all before pinging someone for a review.
As you learn things over your Pull Request please help others on the chat and on PRs to get their stuff right as well! |
@@ -7,12 +7,17 @@ | |||
from coala_utils.string_processing.Core import unescaped_search_for | |||
|
|||
|
|||
@Language | |||
class UnknownLanguage: | |||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be here but rather with the others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you mean in coala. Do you also want it appearing in coalib/bearlib/languages/__init__.py
/ LanguageUberMeta.all
?
If we include it here, at least temporarily, we don't need to do a release of coala
to fix this bug. It could just be part of coala-bears 0.9.2 .
I don't see a problem in doing a bugfix release for coala
|
Do you also want it appearing in |
yeah |
@@ -12,7 +12,7 @@ class AnnotationBear(LocalBear): | |||
AUTHORS_EMAILS = {'[email protected]'} | |||
LICENSE = 'AGPL-3.0' | |||
|
|||
def run(self, filename, file, language: str, coalang_dir: str = None): | |||
def run(self, filename, file, language: str='Unknown', coalang_dir: str=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than allowed. (82 > 79)
LineLengthBear, severity NORMAL, section linelength
.
029f22d
to
034781b
Compare
@sils, so it has been merged, and now you need to do a coala 0.9.1 release. |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
2 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hm this renders the bears using the AnnotationBear in most cases useless by default, doesn't it? KeywordBear is an exception because it has only a soft dependency on AnnotationBear but usually it's a hard one. Maybe we should rather allow bears to spec a soft dependency and if the settings aren't given we just don't run the dependent bear and inform the depending bear about it? |
I think this is not the solution. Marking WIP while waiting for response. |
I'll add some more tests to address that query. |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
2 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
7 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
13 similar comments
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again! |
A missing language setting is not any different from
a language name which has a Language definition that
does not contain the necessary information to correctly
parse the file.
Use a special 'UnknownLanguage' in this scenario.
Also upgrades AnnotationBear from LanguageDefinition
to the new Language.
Fixes #1012
Closes #1095