Skip to content

Commit

Permalink
Use SPDX license header.
Browse files Browse the repository at this point in the history
  • Loading branch information
baron1405 committed Jun 14, 2024
1 parent 6efa4ed commit 9e739ec
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 241 deletions.
1 change: 0 additions & 1 deletion dev/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<!-- File must start with the C Thing copyright header -->
<module name="RegexpHeader">
<property name="headerFile" value="${config_loc}/header.txt"/>
<property name="multiLines" value="3"/>
</module>

<!-- Flag IDE generated comments -->
Expand Down
13 changes: 1 addition & 12 deletions dev/checkstyle/header.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
^/\*$
^ \* Copyright [\d]{4}((,[\s]*[\d]{4})*|(-[\d]{4})?) C Thing Software$
^ \*$
^ \* 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\.$
^ \* See the License for the specific language governing permissions and$
^ \* limitations under the License\.$
^ \* SPDX-License-Identifier: Apache-2.0$
14 changes: 2 additions & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/CountsCache.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand All @@ -31,6 +20,7 @@
* Maintains a cache of various counts requested by reports. This avoids each report calculating the same counts.
* For example, all reports need the total counts, so it is inefficient for each report to calculate it.
*/
@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
public class CountsCache {

private final Map<Path, Map<Language, Counts>> pathCounts;
Expand Down
13 changes: 1 addition & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/LoccExtension.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down
13 changes: 1 addition & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/LoccPlugin.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/LoccReports.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down Expand Up @@ -104,6 +93,7 @@ public LoccReport getText() {
}

@Override
@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
public NamedDomainObjectSet<LoccReport> getEnabled() {
return this.enabled;
}
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/LoccTask.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down Expand Up @@ -44,6 +33,7 @@
/**
* Performs the work of counting the project's code file.
*/
@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
public class LoccTask extends SourceTask implements Reporting<LoccReports> {

private final Property<Boolean> countDocStrings;
Expand Down
13 changes: 1 addition & 12 deletions src/main/java/org/cthing/gradle/plugins/locc/package-info.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

@PackageNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc.reports;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

@PackageNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
/*
* Copyright 2024 C Thing Software
*
* 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.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: Apache-2.0
*/

package org.cthing.gradle.plugins.locc;
Expand Down
Loading

0 comments on commit 9e739ec

Please sign in to comment.