-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: apache license eslint rule #27
Conversation
Signed-off-by: gilbert.tanner <[email protected]>
Signed-off-by: gilbert.tanner <[email protected]>
.eslintrc.cjs
Outdated
'\t distributed under the License is distributed on an "AS IS" BASIS,', | ||
'\t WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.', | ||
'\t See the License for the specific language governing permissions and', | ||
'\t limitations under the License.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should get rid of the tabs, looks weirdly formatted
There is also a short version available https://www.apache.org/foundation/license-faq.html#Apply-My-Software
Copyright [yyyy] [name of copyright owner]
SPDX-License-Identifier: Apache-2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to verify if the shortened version of the license header can be applied. I think @agrimmer or OSPO might have a better idea in this case. For now, I would prefer it to be more verbose than possibly needed - better safe than sorry :)
But yeah, if the tabs can be eliminated, that'd be great. I think (but I am not 100% sure) that template strings might be able to handle this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I woud keep the long version as seems to be standard for other plugins. See e.g.
https://github.com/backstage/backstage/blob/master/plugins/github-issues/src/index.ts
However, can we remove the brackets in [2024] and [Dynatrace].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change requests:
- adjust pattern and template to avoid square brackets,
- if possible, the tabs in the rest of the rule could be improved as per previous comments.
Signed-off-by: gilbert.tanner <[email protected]>
Adds Eslint plugin to check if files contain license header.
Used plugin: https://github.com/Stuk/eslint-plugin-header
Removed all the Eslint files for the packages as they are currently not customizing anything. If a Eslint file is added to a package the header rule must be overridden to change the path of the file:
Example:
Known issues: