You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by dblotsky <gi...@git.apache.org> on 2015/06/17 04:00:01 UTC

[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

GitHub user dblotsky opened a pull request:

    https://github.com/apache/cordova-coho/pull/86

    CB-9109 Switching to using .ratignores

    Switched to using a repository's `.ratignore` file instead of the `ratExcludes` property inside of coho.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-coho CB-9109

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-coho/pull/86.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #86
    
----
commit 50f99e52d40b94cd2e62bd911aab07ab2ea43d2e
Author: Dmitry Blotsky <dm...@gmail.com>
Date:   2015-06-17T01:29:54Z

    CB-9109 Switched to using a repository's .ratignore file instead of the ratExcludes property inside of coho.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on the pull request:

    https://github.com/apache/cordova-coho/pull/86#issuecomment-112943481
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-coho/pull/86


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32664260
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    --- End diff --
    
    Because `lastIndexOf` searches backwards, meaning that if it starts at `0`, it will check for one occurrence and return right away. Arguably, regular `indexOf` would be clearer though. Thoughts?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by TimBarham <gi...@git.apache.org>.
Github user TimBarham commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32650376
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    +}
    +
    +function isComment(pattern) {
    +    return startsWith(pattern, RATIGNORE_COMMENT_PREFIX) ;
    --- End diff --
    
    Perhaps trim leading white-space from pattern (not particularly likely in an ignore file, but to be strictly correct)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32666648
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    --- End diff --
    
    You're right, `indexOf` is much more clear. `startsWith("boomboom","boom");` actually is `true`, because it's doing `lastIndexOf` starting at **0**, but it's clearly confusing. Fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32664301
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    +}
    +
    +function isComment(pattern) {
    +    return startsWith(pattern, RATIGNORE_COMMENT_PREFIX) ;
    --- End diff --
    
    Good call! Fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32667023
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    --- End diff --
    
    It works because `lastIndexOf` searches backwards. That's definitely an implementation detail, and I shouldn't rely on it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by TimBarham <gi...@git.apache.org>.
Github user TimBarham commented on the pull request:

    https://github.com/apache/cordova-coho/pull/86#issuecomment-112934635
  
    Looks good (well, apart from those blank lines you insist on adding at the beginning of blocks :smile:).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by TimBarham <gi...@git.apache.org>.
Github user TimBarham commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32650218
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    --- End diff --
    
    Why `lastIndexOf`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/86#discussion_r32665147
  
    --- Diff: src/audit-license-headers.js ---
    @@ -44,11 +46,27 @@ var COMMON_RAT_EXCLUDES = [
         '*.xcworkspacedata',
         '*.xccheckout',
         '*.xcscheme',
    -    ];
    +];
    +
    +var RAT_IGNORE_PATH          = '.ratignore';
    +var RATIGNORE_COMMENT_PREFIX = '#';
    +
    +var RAT_NAME = 'apache-rat-0.10';
    +var RAT_URL  = 'https://dist.apache.org/repos/dist/release/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz';
    +
    +function startsWith(string, prefix) {
    +    return string.lastIndexOf(prefix, 0) === 0;
    --- End diff --
    
    using lastIndexOf will fail with this won't it?
    startsWith("boomboom","boom"); // false?
    string.indexOf(prefix) === 0 is not only correct, but easier to understand too


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org