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

AnnotationBear: Allow missing language setting #1100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jayvdb
Copy link
Member

@jayvdb jayvdb commented Dec 6, 2016

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

@gitmate-bot
Copy link
Collaborator

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
Copy link
Member

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

Copy link
Member Author

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 .

@sils
Copy link
Member

sils commented Dec 6, 2016 via email

@jayvdb
Copy link
Member Author

jayvdb commented Dec 6, 2016

Do you also want it appearing in coalib/bearlib/languages/__init__.py / LanguageUberMeta.all ?

@sils
Copy link
Member

sils commented Dec 6, 2016

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):
Copy link
Collaborator

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.

@jayvdb jayvdb force-pushed the gh_1012 branch 3 times, most recently from 029f22d to 034781b Compare December 7, 2016 13:34
@jayvdb
Copy link
Member Author

jayvdb commented Dec 7, 2016

@sils, so it has been merged, and now you need to do a coala 0.9.1 release.

@gitmate-bot
Copy link
Collaborator

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
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@sils
Copy link
Member

sils commented Jan 1, 2017

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?

@sils
Copy link
Member

sils commented Jan 2, 2017

I think this is not the solution. Marking WIP while waiting for response.

@jayvdb
Copy link
Member Author

jayvdb commented Jan 2, 2017

Hm this renders the bears using the AnnotationBear in most cases useless by default, doesn't it?

I'll add some more tests to address that query.

@Mixih Mixih mentioned this pull request Jan 3, 2017
2 tasks
@gitmate-bot
Copy link
Collaborator

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
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@Mixih Mixih modified the milestones: 0.10.2, 0.9.3 Feb 26, 2017
@gitmate-bot
Copy link
Collaborator

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
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@jayvdb jayvdb modified the milestones: 0.10.3, 0.10.2 Apr 20, 2017
@gitmate-bot
Copy link
Collaborator

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
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

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

Successfully merging this pull request may close these issues.

4 participants