Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: third_party/devscripts/licensecheck.pl

Issue 1135243005: Adding new comment-matching regex to help license check with assembly files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keeping removal of c comments after removal of new lines Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/devscripts/licensecheck.pl
diff --git a/third_party/devscripts/licensecheck.pl b/third_party/devscripts/licensecheck.pl
index 39f7d541a6c5ffd6c54eda6b0cf86765ed1f9d6c..a59bbf96320c444ae55dd3cb961ed85831daddea 100755
--- a/third_party/devscripts/licensecheck.pl
+++ b/third_party/devscripts/licensecheck.pl
@@ -342,10 +342,17 @@ sub remove_comments($) {
$_ = $_[0];
# Remove Fortran comments
s/^[cC] //gm;
+ # Remove .ASM comments
+ s#^;\*?##gm;
+ # Remove .S comments
+ s#^@ ##gm;
+ # Remove new lines
tr/\t\r\n/ /;
# Remove C / C++ comments
s#(\*/|/[/*])##g;
+ # Remove all characters not matching search
tr% A-Za-z.,@;0-9\(\)/-%%cd;
+ # Collapse multiple spaces into single space
tr/ //s;
$_[0] = $_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698