cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabbage <...@git.apache.org>
Subject [GitHub] cordova-coho pull request: CB-9109 Switching to using .ratignores
Date Wed, 17 Jun 2015 19:30:47 GMT
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


Mime
View raw message