Skip to content

Commit 6f62118

Browse files
committed
Trim trailing whitespace
If a license text had blank lines, they would result in a trailing whitespace when prefixed with the line comments. This change removes trailing whitespace from the middle lines, leaving top and bottom as is. Fixes #10
1 parent fbdca00 commit 6f62118

30 files changed

+96
-98
lines changed

testdata/expected/file.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* Copyright 2016 Google Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Google Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
;; Copyright 2016 Google Inc.
2-
;;
2+
;;
33
;; Licensed under the Apache License, Version 2.0 (the "License");
44
;; you may not use this file except in compliance with the License.
55
;; You may obtain a copy of the License at
6-
;;
6+
;;
77
;; http://www.apache.org/licenses/LICENSE-2.0
8-
;;
8+
;;
99
;; Unless required by applicable law or agreed to in writing, software
1010
;; distributed under the License is distributed on an "AS IS" BASIS,
1111
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.erl

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
% Copyright 2016 Google Inc.
2-
%
2+
%
33
% Licensed under the Apache License, Version 2.0 (the "License");
44
% you may not use this file except in compliance with the License.
55
% You may obtain a copy of the License at
6-
%
6+
%
77
% http://www.apache.org/licenses/LICENSE-2.0
8-
%
8+
%
99
% Unless required by applicable law or agreed to in writing, software
1010
% distributed under the License is distributed on an "AS IS" BASIS,
1111
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* Copyright 2016 Google Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.hh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-- Copyright 2016 Google Inc.
2-
--
2+
--
33
-- Licensed under the Apache License, Version 2.0 (the "License");
44
-- you may not use this file except in compliance with the License.
55
-- You may obtain a copy of the License at
6-
--
6+
--
77
-- http://www.apache.org/licenses/LICENSE-2.0
8-
--
8+
--
99
-- Unless required by applicable law or agreed to in writing, software
1010
-- distributed under the License is distributed on an "AS IS" BASIS,
1111
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!--
22
Copyright 2016 Google Inc.
3-
3+
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
7-
7+
88
http://www.apache.org/licenses/LICENSE-2.0
9-
9+
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Google Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.lisp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
;; Copyright 2016 Google Inc.
2-
;;
2+
;;
33
;; Licensed under the Apache License, Version 2.0 (the "License");
44
;; you may not use this file except in compliance with the License.
55
;; You may obtain a copy of the License at
6-
;;
6+
;;
77
;; http://www.apache.org/licenses/LICENSE-2.0
8-
;;
8+
;;
99
;; Unless required by applicable law or agreed to in writing, software
1010
;; distributed under the License is distributed on an "AS IS" BASIS,
1111
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.mm

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22
// Copyright 2016 Google Inc.
3-
//
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
//
7+
//
88
// http://www.apache.org/licenses/LICENSE-2.0
9-
//
9+
//
1010
// Unless required by applicable law or agreed to in writing, software
1111
// distributed under the License is distributed on an "AS IS" BASIS,
1212
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.proto

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright 2016 Google Inc.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright 2016 Google Inc.
2-
//
2+
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
6-
//
6+
//
77
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
8+
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

testdata/expected/file.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Google Inc.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
7+
*
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
9+
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

0 commit comments

Comments
 (0)