Skip to content

Commit

Permalink
Move license header to wherehows-docs & update documentation (#698)
Browse files Browse the repository at this point in the history
Fix license checking for Play-based projects and fix violated files
  • Loading branch information
mars-lan authored Aug 23, 2017
1 parent 4b30623 commit 03ba2bc
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle/scripts/license.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'license'

ext.licenseFile = file('.license_header.txt')
ext.licenseFile = file('wherehows-docs/license_header.txt')

subprojects {
apply plugin: 'com.github.hierynomus.license'
Expand Down
9 changes: 9 additions & 0 deletions gradle/scripts/play.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ tasks.withType(PlayRun) {
httpPort = project.ext.httpPort
}

// Manually define a sourceSet for license checking
sourceSets {
licsense {
java {
srcDirs = ['app', 'test']
}
}
}

model {
components {
play {
Expand Down
6 changes: 3 additions & 3 deletions wherehows-backend/app/controllers/Application.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Copyright 2015 LinkedIn Corp. All rights reserved.
* <p>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
*
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
3 changes: 3 additions & 0 deletions wherehows-docs/coding-guidelines.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Code formatting
Use standard [LinkedIn code style](LinkedIn%20Style.xml) in IntelliJ to format the code.

# License Header
Please add the [Apache License Header](license_header.txt) to all source files. You can automate this using the `licenseFormat` gradle task.

# Testing
> Note: Info here is for pre-v1.0.0 and will need to be updated
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions wherehows-frontend/app/controllers/Application.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Copyright 2015 LinkedIn Corp. All rights reserved.
* <p>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
*
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
13 changes: 13 additions & 0 deletions wherehows-frontend/test/ApplicationTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/**
* Copyright 2015 LinkedIn Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import org.junit.*;

import play.twirl.api.Content;
Expand Down
13 changes: 13 additions & 0 deletions wherehows-frontend/test/ControllersTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/**
* Copyright 2015 LinkedIn Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
Expand Down
13 changes: 13 additions & 0 deletions wherehows-frontend/test/IntegrationTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/**
* Copyright 2015 LinkedIn Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import org.junit.*;

import play.libs.ws.WS;
Expand Down

0 comments on commit 03ba2bc

Please sign in to comment.