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

generate_bear_requirements.py: Add Perl Metadata #2888

Closed
wants to merge 1 commit into from
Closed

generate_bear_requirements.py: Add Perl Metadata #2888

wants to merge 1 commit into from

Conversation

Ishaan29
Copy link

This enhances generate_bear_requirements.py to support
perl bears and generate Makefile.PL using jinja2
template.
closes #2483

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[ PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmp68ivg31q/bears/perl/PerlCriticBear.py
+++ b/tmp/tmp68ivg31q/bears/perl/PerlCriticBear.py
@@ -29,16 +29,16 @@
     LANGUAGES = {'Perl'}
     REQUIREMENTS = {
         AnyOneOfRequirements(
-        [   PerlRequirement(package='Critic',version='==1.126'),
-            DistributionRequirement(
-            apt_get='libperl-critic-perl',
-            brew=None,
-            dnf='perl-Perl-Critic',
-            portage='dev-perl/Perl-Critic',
-            xbps=None,
-            yum='perl-Perl-Critic',
-            zypper='perl-Perl-Critic',
-        ),]
+            [PerlRequirement(package='Critic', version='==1.126'),
+             DistributionRequirement(
+                apt_get='libperl-critic-perl',
+                brew=None,
+                dnf='perl-Perl-Critic',
+                portage='dev-perl/Perl-Critic',
+                xbps=None,
+                yum='perl-Perl-Critic',
+                zypper='perl-Perl-Critic',
+                ), ]
         )
     }
     AUTHORS = {'The coala developers'}

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[ PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E122 continuation line missing indentation or outdented

Origin: PycodestyleBear (E122), Section: all.autopep8.

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[ PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E201 whitespace after '['

Origin: PycodestyleBear (E201), Section: all.autopep8.

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[ PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

Origin: PycodestyleBear (E231), Section: all.autopep8.

apt_get='libperl-critic-perl',
brew=None,
dnf='perl-Perl-Critic',
portage='dev-perl/Perl-Critic',
xbps=None,
yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
),]
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

Origin: PycodestyleBear (E231), Section: all.autopep8.

@gitmate-bot
Copy link
Collaborator

Comment on ab3e484.

No newline found between shortlog and body at HEAD commit. Please add one.

Origin: GitCommitBear, Section: all.commit.

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpoa088fpl/bears/perl/PerlCriticBear.py
+++ b/tmp/tmpoa088fpl/bears/perl/PerlCriticBear.py
@@ -29,16 +29,16 @@
     LANGUAGES = {'Perl'}
     REQUIREMENTS = {
         AnyOneOfRequirements(
-        [PerlRequirement(package='Critic',version='==1.126'),
-         DistributionRequirement(
-            apt_get='libperl-critic-perl',
-            brew=None,
-            dnf='perl-Perl-Critic',
-            portage='dev-perl/Perl-Critic',
-            xbps=None,
-            yum='perl-Perl-Critic',
-            zypper='perl-Perl-Critic',
-        ), ]
+            [PerlRequirement(package='Critic', version='==1.126'),
+             DistributionRequirement(
+                apt_get='libperl-critic-perl',
+                brew=None,
+                dnf='perl-Perl-Critic',
+                portage='dev-perl/Perl-Critic',
+                xbps=None,
+                yum='perl-Perl-Critic',
+                zypper='perl-Perl-Critic',
+                ), ]
         )
     }
     AUTHORS = {'The coala developers'}

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E122 continuation line missing indentation or outdented

Origin: PycodestyleBear (E122), Section: all.autopep8.

@gitmate-bot
Copy link
Collaborator

Comment on e0f4f53.

No newline found between shortlog and body at HEAD commit. Please add one.

Origin: GitCommitBear, Section: all.commit.

@@ -24,15 +28,18 @@ class PerlCriticBear:

LANGUAGES = {'Perl'}
REQUIREMENTS = {
DistributionRequirement(
AnyOneOfRequirements(
[PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

Origin: PycodestyleBear (E231), Section: all.autopep8.

This enhances generate_bear_requirements.py to support
perl bears and generate Makefile.PL using jinja2
template.
closes #2483
xbps=None,
yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

Origin: SpaceConsistencyBear, Section: all.python.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
+++ b/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
@@ -38,7 +38,7 @@
                 xbps=None,
                 yum='perl-Perl-Critic',
                 zypper='perl-Perl-Critic',
-                ), 
+                ),
             ],
         ),
     }

Copy link
Member

Choose a reason for hiding this comment

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

I think the best way to prevent any such errors are using vs code editor

yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
AnyOneOfRequirements(
[PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
+++ b/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
@@ -29,7 +29,7 @@
     LANGUAGES = {'Perl'}
     REQUIREMENTS = {
         AnyOneOfRequirements(
-            [PerlRequirement(package='Critic',version='==1.126'),
+            [PerlRequirement(package='Critic', version='==1.126'),
              DistributionRequirement(
                 apt_get='libperl-critic-perl',
                 brew=None,

xbps=None,
yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
+++ b/tmp/tmpeyw4fo2e/bears/perl/PerlCriticBear.py
@@ -38,8 +38,8 @@
                 xbps=None,
                 yum='perl-Perl-Critic',
                 zypper='perl-Perl-Critic',
-                ), 
-            ],
+                ),
+             ],
         ),
     }
     AUTHORS = {'The coala developers'}

yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
AnyOneOfRequirements(
[PerlRequirement(package='Critic',version='==1.126'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

Origin: PycodestyleBear (E231), Section: all.autopep8.

xbps=None,
yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

W291 trailing whitespace

Origin: PycodestyleBear (W291), Section: all.autopep8.

yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
],
Copy link
Collaborator

Choose a reason for hiding this comment

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

E124 closing bracket does not match visual indentation

Origin: PycodestyleBear (E124), Section: all.autopep8.

@gitmate-bot
Copy link
Collaborator

Comment on e6d59b0.

No newline found between shortlog and body at HEAD commit. Please add one.

Origin: GitCommitBear, Section: all.commit.

@AkshJain99
Copy link
Member

@Ishaan29 you should run coala before pushing to prevent gitmate from throwing these errors

NAME => 'Coala::Bears',
VERSION => '0.10',
PREREQ_PM => {Perl::Critic => 1.126},
);
Copy link
Member

Choose a reason for hiding this comment

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

add blank at the end of code to prevent travis failing

Copy link
Author

Choose a reason for hiding this comment

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

Sure 😄

xbps=None,
yum='perl-Perl-Critic',
zypper='perl-Perl-Critic',
),
Copy link
Member

Choose a reason for hiding this comment

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

I think the best way to prevent any such errors are using vs code editor

Copy link
Contributor

@KVGarg KVGarg left a comment

Choose a reason for hiding this comment

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

@Ishaan29 All checks are getting failed. Try to make them green by making suggested changes by the gitmate-bot.

@Ishaan29 Ishaan29 closed this Apr 7, 2019
@KVGarg
Copy link
Contributor

KVGarg commented Apr 7, 2019

@Ishaan29 Why you closed this PR? Don't close PR un-necessarily. Suggesting you, to try to solve the issue in this PR only instead of creating another PR!

@Ishaan29
Copy link
Author

Ishaan29 commented Apr 7, 2019

@KVGarg sorry , but have lost the track of this pr after changing my laptop(environment changed). I was unable to commit on this pr.

@KVGarg
Copy link
Contributor

KVGarg commented Apr 7, 2019

OhK 👍 Then in that nothing could be done 😄

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.

Generate Perl package metadata
4 participants