git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Célestin Matte" <celestin.matte@ensimag.fr>
Cc: Git List <git@vger.kernel.org>,
	benoit.person@ensimag.fr,
	Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Subject: Re: [PATCH v4 29/31] git-remote-mediawiki: Add a .perlcriticrc file
Date: Tue, 11 Jun 2013 22:02:59 -0400	[thread overview]
Message-ID: <CAPig+cR+E7QN7H5hCLR-62soBpt7R2eqS05CyNbNUC09g1V9FQ@mail.gmail.com> (raw)
In-Reply-To: <1370989102-24942-30-git-send-email-celestin.matte@ensimag.fr>

On Tue, Jun 11, 2013 at 6:18 PM, Célestin Matte
<celestin.matte@ensimag.fr> wrote:
> Such a file allows to configure perlcritic.
> Here, it is used to prevent to remove many unwanted rules and configure one to

s/to prevent//

> remove unwanted warnings.
>
> Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
> ---
>  contrib/mw-to-git/.perlcriticrc |   28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 contrib/mw-to-git/.perlcriticrc
>
> diff --git a/contrib/mw-to-git/.perlcriticrc b/contrib/mw-to-git/.perlcriticrc
> new file mode 100644
> index 0000000..a1f8451
> --- /dev/null
> +++ b/contrib/mw-to-git/.perlcriticrc
> @@ -0,0 +1,28 @@
> +# These 3 rules demand to add the s, m and x flag to *every* regexp. This is
> +# overkill and would be harmful for readability.
> +[-RegularExpressions::RequireExtendedFormatting]
> +[-RegularExpressions::RequireDotMatchAnything]
> +[-RegularExpressions::RequireLineBoundaryMatching]
> +
> +# This rules says that builtin functions should not be called with parenthesis

s/rules/rule/
s/parenthesis/parentheses/

> +# e.g.: (taken from CPAN's documentation)
> +# open($handle, '>', $filename); #not ok
> +# open $handle, '>', $filename;  #ok
> +# Applying such a rule would mean modifying a huge number of lines for a
> +# question of style.
> +[-CodeLayout::ProhibitParensWithBuiltins]
> +
> +# This rule states that each system call should have its return value checked
> +# The problem is that it includes the print call. Checking every print call's
> +# return value would be harmful to the code readabilty.
> +# This configuration keeps all default function but print.
> +[InputOutput::RequireCheckedSyscalls]
> +functions = open say close
> +
> +# This rules demands to add a dependancy for the Readonly module. This is not
> +# wished.
> +[-ValuesAndExpressions::ProhibitConstantPragma]
> +
> +# This rule is not really useful (rather a question of style) and produces many
> +# warnings among the code.
> +[-ValuesAndExpressions::ProhibitNoisyQuotes]
> --

  reply	other threads:[~2013-06-12  2:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 22:17 [PATCH v4 00/31] git-remote-mediawiki: Follow perlcritic's recommandations Célestin Matte
2013-06-11 22:17 ` [PATCH v4 01/31] git-remote-mediawiki: Make a regexp clearer Célestin Matte
2013-06-11 22:17 ` [PATCH v4 02/31] git-remote-mediawiki: Move "use warnings;" before any instruction Célestin Matte
2013-06-11 22:17 ` [PATCH v4 03/31] git-remote-mediawiki: Replace :utf8 by :encoding(UTF-8) Célestin Matte
2013-06-11 22:17 ` [PATCH v4 04/31] git-remote-mediawiki: Always end a subroutine with a return Célestin Matte
2013-06-11 22:17 ` [PATCH v4 05/31] git-remote-mediawiki: Move a variable declaration at the top of the code Célestin Matte
2013-06-11 22:17 ` [PATCH v4 06/31] git-remote-mediawiki: Change syntax of map calls Célestin Matte
2013-06-11 22:17 ` [PATCH v4 07/31] git-remote-mediawiki: Rewrite unclear line of instructions Célestin Matte
2013-06-11 22:17 ` [PATCH v4 08/31] git-remote-mediawiki: Remove useless regexp modifier (m) Célestin Matte
2013-06-11 22:18 ` [PATCH v4 09/31] git-remote-mediawiki: Change the behaviour of a split Célestin Matte
2013-06-12  1:54   ` Eric Sunshine
2013-06-11 22:18 ` [PATCH v4 10/31] git-remote-mediawiki: Change separator of some regexps Célestin Matte
2013-06-11 22:18 ` [PATCH v4 11/31] git-remote-mediawiki: Change style in a regexp Célestin Matte
2013-06-11 22:18 ` [PATCH v4 12/31] " Célestin Matte
2013-06-11 22:18 ` [PATCH v4 13/31] git-remote-mediawiki: Add newline in the end of die() error messages Célestin Matte
2013-06-11 22:18 ` [PATCH v4 14/31] git-remote-mediawiki: Change the name of a variable Célestin Matte
2013-06-11 22:18 ` [PATCH v4 15/31] git-remote-mediawiki: Turn double-negated expressions into simple expressions Célestin Matte
2013-06-11 22:18 ` [PATCH v4 16/31] git-remote-mediawiki: Remove unused variable $entry Célestin Matte
2013-06-11 22:18 ` [PATCH v4 17/31] git-remote-mediawiki: Rename a variable ($last) which has the name of a keyword Célestin Matte
2013-06-11 22:18 ` [PATCH v4 18/31] git-remote-mediawiki: Assign a variable as undef and make proper indentation Célestin Matte
2013-06-11 22:18 ` [PATCH v4 19/31] git-remote-mediawiki: Check return value of open Célestin Matte
2013-06-11 22:18 ` [PATCH v4 20/31] git-remote-mediawiki: remove import of unused open2 Célestin Matte
2013-06-11 22:18 ` [PATCH v4 21/31] git-remote-mediawiki: Put long code into a subroutine Célestin Matte
2013-06-11 22:18 ` [PATCH v4 22/31] git-remote-mediawiki: Modify strings for a better coding-style Célestin Matte
2013-06-11 22:18 ` [PATCH v4 23/31] git-remote-mediawiki: Brace file handles for print for more clarity Célestin Matte
2013-06-11 22:18 ` [PATCH v4 24/31] git-remote-mediawiki: Replace "unless" statements with negated "if" statements Célestin Matte
2013-06-11 22:18 ` [PATCH v4 25/31] git-remote-mediawiki: Don't use quotes for empty strings Célestin Matte
2013-06-11 22:18 ` [PATCH v4 26/31] git-remote-mediawiki: Put non-trivial numeric values in constants Célestin Matte
2013-06-11 22:18 ` [PATCH v4 27/31] git-remote-mediawiki: Fix a typo ("mediwiki" instead of "mediawiki") Célestin Matte
2013-06-11 22:18 ` [PATCH v4 28/31] git-remote-mediawiki: Clearly rewrite double dereference Célestin Matte
2013-06-11 22:18 ` [PATCH v4 29/31] git-remote-mediawiki: Add a .perlcriticrc file Célestin Matte
2013-06-12  2:02   ` Eric Sunshine [this message]
2013-06-11 22:18 ` [PATCH v4 30/31] git-remote-mediawiki: add a perlcritic rule in Makefile Célestin Matte
2013-06-11 22:18 ` [PATCH v4 31/31] git-remote-mediawiki: Make error message more precise Célestin Matte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cR+E7QN7H5hCLR-62soBpt7R2eqS05CyNbNUC09g1V9FQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=benoit.person@ensimag.fr \
    --cc=celestin.matte@ensimag.fr \
    --cc=git@vger.kernel.org \
    --cc=matthieu.moy@grenoble-inp.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).