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 7 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/CrossContractReader.sol
  2. 2
      acceptance-tests/tests/contracts/EventEmitter.sol
  3. 4
      acceptance-tests/tests/contracts/RemoteSimpleStorage.sol
  4. 2
      acceptance-tests/tests/contracts/RevertReason.sol
  5. 2
      acceptance-tests/tests/contracts/SimpleStorage.sol
  6. 4
      acceptance-tests/tests/contracts/TestDepth.sol
  7. 1
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/Migrations.sol
  8. 16
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleAccountPermissioning.sol
  9. 14
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleNodePermissioning.sol
  10. 14
      acceptance-tests/tests/simple-permissioning-smart-contract/contracts/SimpleNodePermissioningV2.sol
  11. 11
      build.gradle
  12. 2
      consensus/qbft/src/integration-test/resources/validator_contract.sol

@ -59,4 +59,4 @@ contract CrossContractReader {
CrossContractReader cross = CrossContractReader(crossAddress);
cross.destroy();
}
}
}

@ -41,4 +41,4 @@ contract EventEmitter {
function sender() view public returns (address) {
return _sender;
}
}
}

@ -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
* the License. You may obtain a copy of the License at
@ -34,4 +34,4 @@ contract RemoteSimpleStorage {
function get() public view returns (uint) {
return simpleStorage.get();
}
}
}

@ -27,4 +27,4 @@ contract RevertReason {
function revertWithoutRevertReason() public pure returns (bool) {
revert();
}
}
}

@ -28,4 +28,4 @@ contract SimpleStorage {
function get() public view returns (uint) {
return data;
}
}
}

@ -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
* the License. You may obtain a copy of the License at
@ -29,4 +29,4 @@ contract TestDepth {
x = gasleft();
}
}
}
}

@ -12,7 +12,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
pragma solidity ^0.5.0;
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;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS
@ -43,4 +57,4 @@ contract SimpleAccountPermissioning {
function getSize() public view returns(uint256) {
return size;
}
}
}

@ -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;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// 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;
// THIS CONTRACT IS FOR TESTING PURPOSES ONLY
// DO NOT USE THIS CONTRACT IN PRODUCTION APPLICATIONS

@ -220,7 +220,16 @@ allprojects {
}
// Below this line are currently only license header tasks
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 {

@ -23,4 +23,4 @@ contract Validators {
return validators;
}
}
}

Loading…
Cancel
Save