[ https://issues.apache.org/jira/browse/CB-9109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14590397#comment-14590397 ]
ASF GitHub Bot commented on CB-9109: ------------------------------------ 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? > Switch to using .ratignore in cordova repositories > -------------------------------------------------- > > Key: CB-9109 > URL: https://issues.apache.org/jira/browse/CB-9109 > Project: Apache Cordova > Issue Type: Improvement > Components: Coho > Reporter: Dmitry Blotsky > Assignee: Dmitry Blotsky > Labels: coho, rat > Original Estimate: 24h > Remaining Estimate: 24h > > Move from using ratExcludes in repoutils.js within COHO to using a .ratignore > file in each respective repo. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org