You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "SebbASF (JIRA)" <ji...@codehaus.org> on 2012/08/08 11:46:21 UTC

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

SebbASF created MENFORCER-139:
---------------------------------

             Summary: Regex rule example is incorrect; matching is not described
                 Key: MENFORCER-139
                 URL: https://jira.codehaus.org/browse/MENFORCER-139
             Project: Maven 2.x Enforcer Plugin
          Issue Type: Bug
          Components: Standard Rules
         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
            Reporter: SebbASF


The documentation page [1] has an example rule containing:

{noformat}
<regex>\d</regex>
<regexMessage>You must have a digit in your baseDir!</regexMessage>
{noformat}

This is very misleading, as \d only matches a single digit.
The example should be:

{noformat}
<regex>.*\d.*</regex>
<regexMessage>You must have a digit in your baseDir!</regexMessage>
{noformat}

or possibly:

{noformat}
<regex>\d</regex>
<regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
{noformat}

The documentation should state that the regex is applied to the entire value of the property. 
That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.

[1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MENFORCER-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

SebbASF reopened MENFORCER-139:
-------------------------------


Thanks, but the following text

<regexMessage>You're basedir property must contain at least one digit.</regexMessage>

is ungrammatical; it should read:

<regexMessage>Your basedir property must contain at least one digit.</regexMessage>

["You're" means "You are"]
                
> Regex rule example is incorrect; matching is not described
> ----------------------------------------------------------
>
>                 Key: MENFORCER-139
>                 URL: https://jira.codehaus.org/browse/MENFORCER-139
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
>            Reporter: SebbASF
>            Assignee: Paul Gier
>            Priority: Minor
>             Fix For: 1.2
>
>
> The documentation page [1] has an example rule containing:
> {noformat}
> <regex>\d</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> This is very misleading, as \d only matches a single digit.
> The example should be:
> {noformat}
> <regex>.*\d.*</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> or possibly:
> {noformat}
> <regex>\d</regex>
> <regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
> {noformat}
> The documentation should state that the regex is applied to the entire value of the property. 
> That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MENFORCER-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier closed MENFORCER-139.
-------------------------------

    Resolution: Fixed

Fixed in [r1412920|http://svn.apache.org/viewvc?view=revision&revision=1412920].
                
> Regex rule example is incorrect; matching is not described
> ----------------------------------------------------------
>
>                 Key: MENFORCER-139
>                 URL: https://jira.codehaus.org/browse/MENFORCER-139
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
>            Reporter: SebbASF
>            Assignee: Paul Gier
>            Priority: Minor
>             Fix For: 1.2
>
>
> The documentation page [1] has an example rule containing:
> {noformat}
> <regex>\d</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> This is very misleading, as \d only matches a single digit.
> The example should be:
> {noformat}
> <regex>.*\d.*</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> or possibly:
> {noformat}
> <regex>\d</regex>
> <regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
> {noformat}
> The documentation should state that the regex is applied to the entire value of the property. 
> That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MENFORCER-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated MENFORCER-139:
--------------------------------

    Priority: Minor  (was: Major)
    
> Regex rule example is incorrect; matching is not described
> ----------------------------------------------------------
>
>                 Key: MENFORCER-139
>                 URL: https://jira.codehaus.org/browse/MENFORCER-139
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
>            Reporter: SebbASF
>            Assignee: Paul Gier
>            Priority: Minor
>             Fix For: 1.2
>
>
> The documentation page [1] has an example rule containing:
> {noformat}
> <regex>\d</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> This is very misleading, as \d only matches a single digit.
> The example should be:
> {noformat}
> <regex>.*\d.*</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> or possibly:
> {noformat}
> <regex>\d</regex>
> <regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
> {noformat}
> The documentation should state that the regex is applied to the entire value of the property. 
> That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MENFORCER-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated MENFORCER-139:
--------------------------------

    Fix Version/s: 1.2
         Assignee: Paul Gier
    
> Regex rule example is incorrect; matching is not described
> ----------------------------------------------------------
>
>                 Key: MENFORCER-139
>                 URL: https://jira.codehaus.org/browse/MENFORCER-139
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
>            Reporter: SebbASF
>            Assignee: Paul Gier
>             Fix For: 1.2
>
>
> The documentation page [1] has an example rule containing:
> {noformat}
> <regex>\d</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> This is very misleading, as \d only matches a single digit.
> The example should be:
> {noformat}
> <regex>.*\d.*</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> or possibly:
> {noformat}
> <regex>\d</regex>
> <regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
> {noformat}
> The documentation should state that the regex is applied to the entire value of the property. 
> That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MENFORCER-139) Regex rule example is incorrect; matching is not described

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MENFORCER-139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier closed MENFORCER-139.
-------------------------------

    Resolution: Fixed

Thanks for catching that.  Grammar is fixed in [r1413200|http://svn.apache.org/viewvc?view=revision&revision=1413200]
                
> Regex rule example is incorrect; matching is not described
> ----------------------------------------------------------
>
>                 Key: MENFORCER-139
>                 URL: https://jira.codehaus.org/browse/MENFORCER-139
>             Project: Maven 2.x Enforcer Plugin
>          Issue Type: Bug
>          Components: Standard Rules
>         Environment: http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
>            Reporter: SebbASF
>            Assignee: Paul Gier
>            Priority: Minor
>             Fix For: 1.2
>
>
> The documentation page [1] has an example rule containing:
> {noformat}
> <regex>\d</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> This is very misleading, as \d only matches a single digit.
> The example should be:
> {noformat}
> <regex>.*\d.*</regex>
> <regexMessage>You must have a digit in your baseDir!</regexMessage>
> {noformat}
> or possibly:
> {noformat}
> <regex>\d</regex>
> <regexMessage>Your baseDir must consist of a single digit only!</regexMessage>
> {noformat}
> The documentation should state that the regex is applied to the entire value of the property. 
> That is, it uses regex "match" rather than regex "contains", effectively the regex string is enclosed in "^" and "$" before use.
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira