Skip to content
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

Update linters for template #34

Merged
merged 12 commits into from
Jul 9, 2024
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Please provide the version number where this issue was encountered.

## Checklist

<!-- TODO: Update the link below to point to your project's contributing guidelines -->
<!-- TODO: Update the link below if docs stored in a different location -->
- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md)
- [ ] I have verified this does not duplicate an existing issue
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Please describe what you envision the solution to this problem would look like.

## Alternatives Considered

Please briefly describe which alternatives, if any, have been considered, including merits of alternate approaches and
tradeoffs being made.
Please briefly describe which alternatives, if any, have been considered,
including merits of alternate approaches and tradeoffs being made.

## Additional Context

Expand Down
14 changes: 8 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## Description

Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.
Please provide a meaningful description of what this change will do, or is for.
Bonus points for including links to related issues, other PRs, or technical
references.

Note that by _not_ including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.
Note that by _not_ including a description, you are asking reviewers to do extra
work to understand the context of this change, which may lead to your PR taking
much longer to review, or result in it not being reviewed at all.

## Type of Change

- [ ] Bug Fix
- [ ] Bugfix
- [ ] New Feature
- [ ] Breaking Change
- [ ] Refactor
Expand All @@ -17,7 +19,7 @@ change, which may lead to your PR taking much longer to review, or result in it

## Checklist

<!-- TODO: Update the link below to point to your project's contributing guidelines -->
<!-- TODO: Update the link below if docs stored in a different location -->
- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md)
- [ ] Existing issues have been referenced (where applicable)
- [ ] I have verified this change is not present in other open pull requests
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
Expand Down
37 changes: 37 additions & 0 deletions .github/linters/.markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# Default state for all rules
default: true
# Path to configuration file to extend
extends: null

# MD013/line-length
# https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md
MD013:
# Number of characters
line_length: 80
# Include code blocks
code_blocks: false
# Include tables
tables: false
# Include headings
headings: false
# Strict length checking
strict: false
# Stern length checking
stern: false

# MD024/no-duplicate-heading
# https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md024.md
MD024:
# Only check sibling headings
siblings_only: true

# MD025/single-title/single-h1
# https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md025.md
MD025:
# RegExp for matching title in front matter
front_matter_title: ""

# MD041/first-line-heading/first-line-h1
# https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md041.md
MD041: false
10 changes: 10 additions & 0 deletions .github/linters/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default

rules:
line-length:
max: 80
level: warning
indentation: disable
truthy:
check-keys: false
32 changes: 23 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
---
name: lint

on:
push:
# Run superlinter on pushes to default branch
branches:
# Run on pushes to default branch
- main
# Run against pull requests
# Run superlinter on pull request events
pull_request:

# Declare default permissions as read-only
permissions: read-all

jobs:
markdown:
super-linter:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- name: 🔒 harden runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: ⬇️ lint markdown files
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
config: ".markdownlint.json"
args: "**/*.md .github/**/*.md"
fetch-depth: 0
- name: 🧹 run superlinter
uses: super-linter/super-linter@4758be622215d0954c8353ee4877ffd60111cf8e # v6.4.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: ".github/linters"
MARKDOWN_CONFIG_FILE: ".markdownlint.yml"
YAML_CONFIG_FILE: ".yamllint.yml"
VALIDATE_ALL_CODEBASE: false
MULTI_STATUS: false
1 change: 1 addition & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: scorecard

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: stale

on:
Expand Down
16 changes: 0 additions & 16 deletions .markdownlint.json

This file was deleted.

16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

<!-- textlint-disable -->

## [Unreleased]

Expand All @@ -14,9 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Bump actions/checkout from 4.1.1 to 4.1.2 by @dependabot in #16
- Bump actions/checkout from 4.1.2 to 4.1.3 in the github group by @dependabot in #17
- Bump actions/checkout from 4.1.3 to 4.1.4 in the github group by @dependabot in #18
- Bump actions/checkout from 4.1.4 to 4.1.5 in the github group by @dependabot in #20
- Bump actions/checkout from 4.1.2 to 4.1.3 in the github group by @dependabot
in #17
- Bump actions/checkout from 4.1.3 to 4.1.4 in the github group by @dependabot
in #18
- Bump actions/checkout from 4.1.4 to 4.1.5 in the github group by @dependabot
in #20
- Bump step-security/harden-runner from 2.7.0 to 2.7.1 by @dependabot in #19

## [1.0.0] - 2024-02-16
Expand All @@ -33,3 +39,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[unreleased]: https://github.com/cisco-ospo/oss-template/compare/v1.0.1...HEAD
[1.0.1]: https://github.com/cisco-ospo/oss-template/releases/tag/v1.0.1
[1.0.0]: https://github.com/cisco-ospo/oss-template/releases/tag/v1.0.0

<!-- textlint-enable -->
40 changes: 20 additions & 20 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -22,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Expand Down Expand Up @@ -60,8 +60,8 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
<INSERT_CONTACT_METHOD>.
All complaints will be reviewed and investigated promptly and fairly.
<INSERT_CONTACT_METHOD>. All complaints will be reviewed and investigated
promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Expand All @@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

Expand All @@ -109,21 +109,21 @@ Violating these terms may lead to a permanent ban.
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
Expand Down
63 changes: 37 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
# How to Contribute

Thanks for your interest in contributing to `<project name>`! Here are a few general guidelines on contributing and
reporting bugs that we ask you to review. Following these guidelines helps to communicate that you respect the time of
the contributors managing and developing this open source project. In return, they should reciprocate that respect in
addressing your issue, assessing changes, and helping you finalize your pull requests. In that spirit of mutual respect,
we endeavor to review incoming issues and pull requests within 10 days, and will close any lingering issues or pull
requests after 60 days of inactivity.

Please note that all of your interactions in the project are subject to our [Code of Conduct](/CODE_OF_CONDUCT.md). This
includes creation of issues or pull requests, commenting on issues or pull requests, and extends to all interactions in
any real-time space e.g., Slack, Discord, etc.
Thanks for your interest in contributing to `<project name>`! Here are a few
general guidelines on contributing and reporting bugs that we ask you to review.
Following these guidelines helps to communicate that you respect the time of the
contributors managing and developing this open source project. In return, they
should reciprocate that respect in addressing your issue, assessing changes, and
helping you finalize your pull requests. In that spirit of mutual respect, we
endeavor to review incoming issues and pull requests within 10 days, and will
close any lingering issues or pull requests after 60 days of inactivity.

Please note that all of your interactions in the project are subject to our
[Code of Conduct](/CODE_OF_CONDUCT.md). This includes creation of issues or pull
requests, commenting on issues or pull requests, and extends to all interactions
in any real-time space e.g., Slack, Discord, etc.

## Reporting Issues

Before reporting a new issue, please ensure that the issue was not already reported or fixed by searching through our
[issues list](https://github.com/org_name/repo_name/issues).
Before reporting a new issue, please ensure that the issue was not already
reported or fixed by searching through our [issues
list](https://github.com/org_name/repo_name/issues).

When creating a new issue, please be sure to include a **title and clear description**, as much relevant information as
possible, and, if possible, a test case.
When creating a new issue, please be sure to include a **title and clear
description**, as much relevant information as possible, and, if possible, a
test case.

**If you discover a security bug, please do not report it through GitHub. Instead, please see security procedures in
[SECURITY.md](/SECURITY.md).**
**If you discover a security bug, please do not report it through GitHub.
Instead, please see security procedures in [SECURITY.md](/SECURITY.md).**

## Sending Pull Requests

Before sending a new pull request, take a look at existing pull requests and issues to see if the proposed change or fix
has been discussed in the past, or if the change was already implemented but not yet released.
Before sending a new pull request, take a look at existing pull requests and
issues to see if the proposed change or fix has been discussed in the past, or
if the change was already implemented but not yet released.

We expect new pull requests to include tests for any affected behavior, and, as we follow semantic versioning, we may
reserve breaking changes until the next major version release.
We expect new pull requests to include tests for any affected behavior, and, as
we follow semantic versioning, we may reserve breaking changes until the next
major version release.

## Other Ways to Contribute

We welcome anyone that wants to contribute to `<project name>` to triage and reply to open issues to help troubleshoot
and fix existing bugs. Here is what you can do:
We welcome anyone that wants to contribute to `<project name>` to triage and
reply to open issues to help troubleshoot and fix existing bugs. Here is what
you can do:

- Help ensure that existing issues follows the recommendations from the _[Reporting Issues](#reporting-issues)_ section,
providing feedback to the issue's author on what might be missing.
- Review and update the existing content of our [Wiki](https://github.com/org_name/repo_name/wiki) with up-to-date
- Help ensure that existing issues follows the recommendations from the
_[Reporting Issues](#reporting-issues)_ section, providing feedback to the
issue's author on what might be missing.
- Review and update the existing content of our
[Wiki](https://github.com/org_name/repo_name/wiki) with up-to-date
instructions and code samples.
- Review existing pull requests, and testing patches against real existing applications that use `<project name>`.
- Review existing pull requests, and testing patches against real existing
applications that use `<project name>`.
- Write a test, or add a missing test case to an existing test.

Thanks again for your interest on contributing to `<project name>`!
Expand Down
Loading