Skip to content

Commit

Permalink
Merge pull request #1371 from ydah/add_markdownlint
Browse files Browse the repository at this point in the history
Add mdformat to the workflow in GitHub Actions
  • Loading branch information
pirj authored Oct 22, 2022
2 parents 45d1882 + 4874a5a commit c818e9a
Show file tree
Hide file tree
Showing 7 changed files with 449 additions and 439 deletions.
44 changes: 22 additions & 22 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ If you encounter problems or have ideas for improvements or new features, please

## Issue reporting

* Check that the issue has not already been reported.
* Check that the issue has not already been fixed in the latest code (a.k.a. `master`).
* Check if the issue is a non-goal of RuboCop RSpec.
* Be clear, concise, and precise in your description of the problem.
* Open an issue with a descriptive title and a summary in grammatically correct, complete sentences.
* Report the versions of `rubocop-rspec`, as well as the output of `rubocop -V`.
* Include any relevant code to the issue summary.
- Check that the issue has not already been reported.
- Check that the issue has not already been fixed in the latest code (a.k.a. `master`).
- Check if the issue is a non-goal of RuboCop RSpec.
- Be clear, concise, and precise in your description of the problem.
- Open an issue with a descriptive title and a summary in grammatically correct, complete sentences.
- Report the versions of `rubocop-rspec`, as well as the output of `rubocop -V`.
- Include any relevant code to the issue summary.

## Pull requests

1. Fork the project.
2. Create a feature branch.
3. Make sure to add tests.
4. Make sure the test suite passes (run `rake`).
5. Add a [changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) entry.
6. Commit your changes.
7. Push to the branch.
8. Create new Pull Request.
1. Fork the project.
2. Create a feature branch.
3. Make sure to add tests.
4. Make sure the test suite passes (run `rake`).
5. Add a [changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) entry.
6. Commit your changes.
7. Push to the branch.
8. Create new Pull Request.

## Creating new cops

* Document examples of good and bad code in your cop.
* Add an entry to `config/default.yml`. It's an ordered list, so be sure to insert at the appropriate place.
* Run `bundle exec rake`. This will verify that the build passes as well as generate documentation and ensure that `config/default.yml` is up to date (don't forget to commit the documentation).
* Add tests for as many use cases as you can think of. Always add tests for both bad code that should register an offense and good code that should not.
* Common pitfalls:
* If your cop inspects code outside of an example, check for false positives when similarly named variables are used inside of the example.
* If your cop inspects code inside of an example, check that it works when the example is empty (empty `describe`, `it`, etc.).
- Document examples of good and bad code in your cop.
- Add an entry to `config/default.yml`. It's an ordered list, so be sure to insert at the appropriate place.
- Run `bundle exec rake`. This will verify that the build passes as well as generate documentation and ensure that `config/default.yml` is up to date (don't forget to commit the documentation).
- Add tests for as many use cases as you can think of. Always add tests for both bad code that should register an offense and good code that should not.
- Common pitfalls:
- If your cop inspects code outside of an example, check for false positives when similarly named variables are used inside of the example.
- If your cop inspects code inside of an example, check that it works when the example is empty (empty `describe`, `it`, etc.).
28 changes: 14 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
**Replace this text with a summary of the changes in your PR. The more detailed you are, the better.**

---
______________________________________________________________________

Before submitting the PR make sure the following are checked:

* [ ] Feature branch is up-to-date with `master` (if not - rebase it).
* [ ] Squashed related commits together.
* [ ] Added tests.
* [ ] Updated documentation.
* [ ] Added an entry to the `CHANGELOG.md` if the new code introduces user-observable changes.
* [ ] The build (`bundle exec rake`) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).
- [ ] Feature branch is up-to-date with `master` (if not - rebase it).
- [ ] Squashed related commits together.
- [ ] Added tests.
- [ ] Updated documentation.
- [ ] Added an entry to the `CHANGELOG.md` if the new code introduces user-observable changes.
- [ ] The build (`bundle exec rake`) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

* [ ] Added the new cop to `config/default.yml`.
* [ ] The cop is configured as `Enabled: pending` in `config/default.yml`.
* [ ] The cop is configured as `Enabled: true` in `.rubocop.yml`.
* [ ] The cop documents examples of good and bad code.
* [ ] The tests assert both that bad code is reported and that good code is not reported.
* [ ] Set `VersionAdded` in `default/config.yml` to the next minor version.
- [ ] Added the new cop to `config/default.yml`.
- [ ] The cop is configured as `Enabled: pending` in `config/default.yml`.
- [ ] The cop is configured as `Enabled: true` in `.rubocop.yml`.
- [ ] The cop documents examples of good and bad code.
- [ ] The tests assert both that bad code is reported and that good code is not reported.
- [ ] Set `VersionAdded` in `default/config.yml` to the next minor version.

If you have modified an existing cop's configuration options:

* [ ] Set `VersionChanged` in `config/default.yml` to the next major version.
- [ ] Set `VersionChanged` in `config/default.yml` to the next major version.
11 changes: 11 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ jobs:
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mdformat:
name: Mdformat
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Mdformat
uses: ydah/mdformat-action@main
with:
number: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit c818e9a

Please sign in to comment.