Skip to content

Commit f768d75

Browse files
committed
Set Apache-2.0 headers flush, within 72 columns
1 parent 9cc3f6a commit f768d75

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

licensor

+15-14
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,21 @@ if (license === 'Apache-2.0') {
146146

147147
var licenseURL = 'http://www.apache.org/licenses/LICENSE-2.0'
148148
var header = [
149-
'/* Copyright ' + year + ' ' + owners,
150-
' *',
151-
' * Licensed under the Apache License, Version 2.0 (the "License");',
152-
' * you may not use this file except in compliance with the License.',
153-
' * You may obtain a copy of the License at',
154-
' *', (
155-
' * ' + licenseURL ),
156-
' *',
157-
' * Unless required by applicable law or agreed to in writing, software',
158-
' * distributed under the License is distributed on an "AS IS" BASIS,',
159-
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
160-
' * See the License for the specific language governing permissions and',
161-
' * limitations under the License.',
162-
' */'
149+
'/*',
150+
'Copyright ' + year + ' ' + owners,
151+
'',
152+
'Licensed under the Apache License, Version 2.0 (the "License");',
153+
'you may not use this file except in compliance with the License.',
154+
'You may obtain a copy of the License at',
155+
'',
156+
(' ' + licenseURL),
157+
'',
158+
'Unless required by applicable law or agreed to in writing, software',
159+
'distributed under the License is distributed on an "AS IS" BASIS,',
160+
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
161+
'See the License for the specific language governing permissions and',
162+
'limitations under the License.',
163+
'*/'
163164
].join('\n')
164165

165166
var probablyHasHeader = function (fileContent) {

tests/apache-2.0/test.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,21 @@ tap.equal(
4141

4242
var text = readFileSync('index.js')
4343
tap.equal(text, [
44-
'/* Copyright ' + year + ' John Doe',
45-
' *',
46-
' * Licensed under the Apache License, Version 2.0 (the "License");',
47-
' * you may not use this file except in compliance with the License.',
48-
' * You may obtain a copy of the License at',
49-
' *',
50-
' * http://www.apache.org/licenses/LICENSE-2.0',
51-
' *',
52-
' * Unless required by applicable law or agreed to in writing, software',
53-
' * distributed under the License is distributed on an "AS IS" BASIS,',
54-
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
55-
' * See the License for the specific language governing permissions and',
56-
' * limitations under the License.',
57-
' */'
44+
'/*',
45+
'Copyright ' + year + ' John Doe',
46+
'',
47+
'Licensed under the Apache License, Version 2.0 (the "License");',
48+
'you may not use this file except in compliance with the License.',
49+
'You may obtain a copy of the License at',
50+
'',
51+
' http://www.apache.org/licenses/LICENSE-2.0',
52+
'',
53+
'Unless required by applicable law or agreed to in writing, software',
54+
'distributed under the License is distributed on an "AS IS" BASIS,',
55+
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
56+
'See the License for the specific language governing permissions and',
57+
'limitations under the License.',
58+
'*/'
5859
].join('\n') + '\n\n' + indexBefore)
5960

6061
fs.writeFileSync(path.join(__dirname, 'index.js'), indexBefore)

0 commit comments

Comments
 (0)