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

[IMP] pylint_odoo: Add check for manifest-version-format #18

Conversation

luiseevaquer
Copy link

[IMP] pylint_odoo: Add check for manifest-version-format

@oca-clabot
Copy link

Hey @lescobarvx, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/website.cla
Here is a list of the users:

  • @lescobarvx (login unknown in OCA database)

Appreciation of efforts,
OCA CLAbot

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c404a67 on vauxoo-dev:master-oca-add-pylint-check-manifest-ver-dev-lescobarvx into e12d096 on OCA:master.

@moylop260
Copy link
Collaborator

Could you run messages2rst method and modified the README.rst file with your new check, please?

@@ -8,7 +8,7 @@
from pylint_odoo import misc


EXPECTED_ERRORS = 52
EXPECTED_ERRORS = 54
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As commented other times, it would be better to add a line like this:

EXPECTED_ERRORS += 2  # Errors due to C8106: Wrong version format

This way, multiple PRs don't get affected each other and the number seems less random.

@luiseevaquer luiseevaquer force-pushed the master-oca-add-pylint-check-manifest-ver-dev-lescobarvx branch 2 times, most recently from 1417f04 to 95891e1 Compare April 6, 2016 00:52
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 95891e1 on vauxoo-dev:master-oca-add-pylint-check-manifest-ver-dev-lescobarvx into e12d096 on OCA:master.

@pedrobaeza
Copy link
Member

Thanks!

👍

@luiseevaquer
Copy link
Author

@pedrobaeza

You're welcome!!

@moylop260
Copy link
Collaborator

👍

@@ -261,6 +274,15 @@ def visit_dict(self, node):
self.add_message('license-allowed',
node=node, args=(license,))

# Check version format
version_format = manifest_dict.get('version', None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the code:

-            version_format = manifest_dict.get('version', None)
+           version_format = manifest_dict.get('version', '')

To avoid follow error:
screen shot 2016-04-06 at 9 08 52 pm

@luiseevaquer luiseevaquer force-pushed the master-oca-add-pylint-check-manifest-ver-dev-lescobarvx branch from 95891e1 to 6d2415b Compare April 7, 2016 02:16
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 6d2415b on vauxoo-dev:master-oca-add-pylint-check-manifest-ver-dev-lescobarvx into e12d096 on OCA:master.

@moylop260
Copy link
Collaborator

@guewen @max3903 @dreispt @lepistone your feedback is welcome

@@ -9,6 +9,7 @@


EXPECTED_ERRORS = 52
EXPECTED_ERRORS += 2 # Errors due to C8106: Wrong version format
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lescobarvx why not EXPECTED_ERRORS = 54 in one line and add the comment in the commit message?

otherwise 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max3903
@pedrobaeza indicated me to do so because that way multiple PRs don't get affected each other and the number seems less random.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lescobarvx ok, thanks.

👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First version was created with 54

But @pedrobaeza recommend us use with +2

screen shot 2016-04-06 at 11 40 44 pm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, is more easy to follow the total number of expected errors and to avoid conflicts if multiple PRs are done simultaneously.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza What do you propose to avoid having this after couple contributions?

EXPECTED_ERRORS = 52
EXPECTED_ERRORS += 2  # Errors due to C8106: Wrong version format
EXPECTED_ERRORS += 3  # Errors due to XXXX
EXPECTED_ERRORS += 4  # Errors due to YYYY
EXPECTED_ERRORS += 5  # Errors due to ZZZZ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's my exact point

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:o) Ok, but at some point (when there is no active PR), we should reset that to a single line.

Let's merge it and move forward.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I prefer to let unfolded. As said, this allows to identify how many errors of each type you have introduced. If you have a global counter, you need to check each of them for a global number, and it's more prone to put the given number by the test than the real expected one.

@max3903
Copy link
Sponsor Member

max3903 commented Apr 7, 2016

CLA is OK.

@moylop260
Copy link
Collaborator

@max3903
Thanks for feedback
Could you add your feedback here too?

@pedrobaeza pedrobaeza merged commit b20cc2d into OCA:master Apr 7, 2016
@pedrobaeza
Copy link
Member

@moylop260, should we make a new version?

@oca-clabot
Copy link

Hey @lescobarvx,
We acknowledge that the following users have signed our Contributor License Agreement:

  • @lescobarvx

Appreciation of efforts,
OCA CLAbot

@moylop260
Copy link
Collaborator

@moylop260, should we make a new version?

Yes

@pedrobaeza
Copy link
Member

As Luis is proposing other changes, we can wait for them.

@luisg123v luisg123v deleted the master-oca-add-pylint-check-manifest-ver-dev-lescobarvx branch August 6, 2020 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants