Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
hardhat-spdx-license-identifier
Advanced tools
Readme
Prepend Solidity source files in Hardhat projects with the SPDX License Identifier specified in package.json
.
Versions of this plugin prior to
2.0.0
were released asbuidler-spdx-license-identifier
.
npm install --save-dev hardhat-spdx-license-identifier
# or
yarn add --dev hardhat-spdx-license-identifier
Load plugin in Hardhat config:
require('hardhat-spdx-license-identifier');
Add configuration under the spdxLicenseIdentifier
key:
option | description | default |
---|---|---|
overwrite | whether to overwrite existing SPDX license identifiers | false |
runOnCompile | whether to automatically prepend identifiers during compilation | false |
only | Array of String matchers used to select included paths, defaults to all contracts if length is 0 | [] |
except | Array of String matchers used to exclude paths | [] |
spdxLicenseIdentifier: {
overwrite: true,
runOnCompile: true,
except: ['vendor/']
}
The included Hardhat task may be run manually:
npx hardhat prepend-spdx-license
# or
yarn run hardhat prepend-spdx-license
Files which do not contain a license identifier will be prepended with one. Files with a license identifier which does not match that which is specified in package.json
may be updated, depending on configuration.
FAQs
Prepend local Solidity source files with an SPDX License Identifier
The npm package hardhat-spdx-license-identifier receives a total of 1,830 weekly downloads. As such, hardhat-spdx-license-identifier popularity was classified as popular.
We found that hardhat-spdx-license-identifier demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.