build - Apply spotless license header checks to solidity sources (#7046)

* build - Apply spotless license header checks to solidity sources

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
pull/7050/head
Usman Saleem 6 months ago committed by GitHub
parent 6728e095dd
commit 87afe64cd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      acceptance-tests/tests/contracts/RemoteSimpleStorage.sol
  2. 2
      acceptance-tests/tests/contracts/TestDepth.sol
  3. 1
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/Migrations.sol
  4. 14
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleAccountPermissioning.sol
  5. 14
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleNodePermissioning.sol
  6. 14
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleNodePermissioningV2.sol
  7. 11
      build.gradle

@ -1,5 +1,5 @@
/* /*
* Copyright contributors to Hyperledger Besu * Copyright contributors to Hyperledger Besu.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * 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 * the License. You may obtain a copy of the License at

@ -1,5 +1,5 @@
/* /*
* Copyright Hyperledger Besu Contributors. * Copyright contributors to Hyperledger Besu.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * 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 * the License. You may obtain a copy of the License at

@ -12,7 +12,6 @@
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
pragma solidity ^0.5.0; pragma solidity ^0.5.0;
contract Migrations { contract Migrations {

@ -1,3 +1,17 @@
/*
* Copyright contributors to Hyperledger Besu.
*
* 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
*/
pragma solidity >=0.4.0 <0.6.0; pragma solidity >=0.4.0 <0.6.0;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY // THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS // DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS

@ -1,3 +1,17 @@
/*
* Copyright contributors to Hyperledger Besu.
*
* 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
*/
pragma solidity >=0.4.0 <0.6.0; pragma solidity >=0.4.0 <0.6.0;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY // THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS // DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS

@ -1,3 +1,17 @@
/*
* Copyright contributors to Hyperledger Besu.
*
* 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
*/
pragma solidity >=0.4.0 <0.6.0; pragma solidity >=0.4.0 <0.6.0;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY // THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS // DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS

@ -220,7 +220,16 @@ allprojects {
} }
// Below this line are currently only license header tasks // Below this line are currently only license header tasks
format 'bash', { target '**/*.sh' } format 'bash', { target '**/*.sh' }
format 'sol', { target '**/*.sol' } format 'Solidity', {
target '**/*.sol'
targetExclude '**/src/reference-test/**', '**/src/main/generated/**', '**/src/test/generated/**', '**/src/jmh/generated/**'
trimTrailingWhitespace()
endWithNewline()
licenseHeaderFile("${rootDir}/gradle/spotless/java.former.license","^pragma solidity.+?").named("former").onlyIfContentMatches("^/\\*\\r?\\n.*Copyright ConsenSys AG\\.")
licenseHeaderFile("${rootDir}/gradle/spotless/java.former.date.license","^pragma solidity.+?").named("former.date").onlyIfContentMatches("^/\\*\\r?\\n.* Copyright \\d{4} ConsenSys AG\\.")
licenseHeaderFile("${rootDir}/gradle/spotless/java.current.license","^pragma solidity.+?").named("current").onlyIfContentMatches("^(?!/\\*\\r?\\n \\*.*ConsenSys AG\\.)")
}
} }
tasks.withType(JavaCompile).configureEach { tasks.withType(JavaCompile).configureEach {

Loading…
Cancel
Save