Skip to content

Commit

Permalink
Markdown files linting
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 authored Sep 11, 2023
1 parent 16eacad commit df6647f
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 42 deletions.
15 changes: 15 additions & 0 deletions .github/markdown-link-check.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ignorePatterns": [
{
"pattern": "^https://opensource.org"
}
],
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
}
18 changes: 18 additions & 0 deletions .github/markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*):(\\d+)(:(\\d+))? (MD\\d+\\/[^ ]+) (.*)$",
"file": 1,
"line": 2,
"column": 4,
"code": 5,
"message": 6
}
]
}
]
}
11 changes: 11 additions & 0 deletions .github/markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"default": true,
"MD013": {
"line_length": 120
},
"MD014": false,
"MD029": false,
"MD025": false,
"MD034": false,
"MD041": false
}
40 changes: 40 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: markdown
on:
pull_request:
paths:
- '.github/workflows/markdown.yml'
- '.github/markdownlint.json'
- '.github/markdownlint.jsonc'
- '**/*.md'
jobs:
markdown-lint:
name: Lint markdown files
runs-on: ubuntu-22.04
steps:
- name: Checkout devtools
uses: actions/checkout@v4

- name: Register markdownlint warning matcher
run: |
echo "::add-matcher::.github/markdownlint.json"
- name: Lint markdown files
uses: avto-dev/markdown-lint@v1
with:
args: '**/*.md'
config: '.github/markdownlint.jsonc'
ignore: 'third_party_licenses.md'

- name: Remove markdownlint warning matcher
if: always()
run: |
echo "::remove-matcher owner=markdownlint::"
- uses: gaurav-nelson/github-action-markdown-link-check@master
if: always()
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
base-branch: ${{ github.base_ref }}
config-file: '.github/markdown-link-check.jsonc'
42 changes: 38 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
This v1.0.0 release contains:

Bug fixes:

- Debug log level not working on some commands
- Use keil.com/pack/ as default address to fetch PDSC files, if index.pidx has been downloaded from keil.com/pack
- If PDSC file is no longer listed in index.pidx, it shall be removed from .Web folder
- touch pack.idx after init command
- refined --skip-touch option

New features:

- update-index: added option "-a" to download all missing PDSC files that are listed in index.pidx
- Encoded progress, when tool is called from other tools

Expand All @@ -18,25 +20,29 @@ New features:
This v0.9.4 release contains:

Bug fixes:

- MacOS tests failing

# v0.9.3

This v0.9.3 release contains:

Bug fixes:

- cpackget add -f packlist.txt throws an error when the file is empty
- Installing a local pack that does not exist triggers error message twice
- add -f packs.txt: does not check if the required/dependent pack is installed already

New features:

- added --skip-touch flag to not touch pack.idx

# v0.9.2

This v0.9.2 release contains:

Bug fixes:

- Install latest available version for pack dependencies if possible
- Use modern version notation when referring to pack dependencies
- Update copyright year
Expand All @@ -46,10 +52,12 @@ Bug fixes:
This v0.9.1 release contains:

New features:

- Install a pack's required packages by default
- "cpackget list required" to list installed packages with dependencies and their status

Bug fixes:

- Don't set "pack.idx" as read-only
- Fix pack name checking when installing, according to the current specification

Expand All @@ -58,9 +66,11 @@ Bug fixes:
This v0.9.0 release contains:

New features:

- Update to Go 1.19

Bug fixes:

- Fix concurrent pack installation when the number of packs is smaller than the set concurrency
- Fix progress bar repeatedly getting printed, setting it below the info message as not to break it when resizing
- Fix signature field version checking (for signature-create and signature-verify)
Expand All @@ -70,30 +80,35 @@ Bug fixes:
This v0.8.5 release contains:

New features:

- Don't fetch PDSC files from locally sourced packs

Bug fixes:

- Fix version handling on signature creation/verification

# v0.8.5-rc1

This v0.8.5-rc1 pre-release contains:

Bug fixes:

- Fix version handling on signature creation/verification

# v0.8.4

This v0.8.4 release contains:

Bug fixes

- Fix default pack root initialization

# v0.8.3

This v0.8.3 release contains:

New features

- cryptography module reworked to support X.509 and PGP schemes
- Default `CMSIS_PACK_ROOT` location
- Initialize public index if using the default pack root location
Expand All @@ -110,6 +125,7 @@ This v0.8.2 release contains:
This v0.8.1 release contains:

Bug fixes:

- Fix HTTP(S) proxy usage
- Hide non relevant global flags
- Clearer error message when initializing an invalid path like a directory or unexisting file
Expand All @@ -119,6 +135,7 @@ Bug fixes:
This v0.8.0 release contains:

New features:

- `cpackget signature-create`: creates and PGP signs a .checksum file
- `cpackget signature-verify`: verifies a .checksum file against its PGP signature
- `cpackget checksum-verify` infers checksum path from the pack's directory
Expand All @@ -128,21 +145,25 @@ New features:
This v0.7.2 release contains:

Bug fixes:

- `cpackget --version` outputs correct value
- Local paths are consistent on all systems, no more backslashes
- "local_repository.pidx" has a static `<vendor>` tag, matching the spec

New features:

- Using Go 1.18 and updated dependencies, slightly faster

# v0.7.1

This v0.7.1 release is dedicated to improving network capabilities. It contains:

Bug fixes:

- Timeout on broken downloads instead of getting stuck (via new timeout flag)

New features:

- `cpackget init --all-pdsc-files/-a`: Downloads all PDSC files listed in the initialized public index
- `--concurrent-downloads/-C`: global flag to enable concurrent/parallel downloads when downloading multiple files
- `--timeout/-T`: global flag setting a maximum timeout for all HTTP/HTTPS downloads
Expand All @@ -152,31 +173,39 @@ New features:
This v0.7 release contains:

Bug fixes:

- Not accepting a license is not considered an error

New features:
- Two new commands, `checksum-create` and `checksum-verify`. They are part of a new "cryptography" module, intended to provide advanced security measures for pack installation.
- "Pack root" is now read-only, with the exception of `local_repository.idx`. This measure prevents accidental environment corruption.

- Two new commands, `checksum-create` and `checksum-verify`. They are part of a new "cryptography" module,
intended to provide advanced security measures for pack installation.
- "Pack root" is now read-only, with the exception of `local_repository.idx`. This measure prevents accidental
environment corruption.

# v0.6.0

This release is more of a "symbolic" one, as the last one should've been a minor version bump. This release contains:

Bug fixes

- Update documentation on removing packs via PDSC file

New features

- Allow pack versions with leading zeros

# v0.5.1

This v0.5.1 release contains:

Bug fixes

- Install only minimum and major versions if available
- Fix intermittent testing on Windows

New features

- Filter packs when listing with --filter
- New update-index command

Expand All @@ -185,12 +214,14 @@ New features
This v0.5 release contains:

Bug fixes

- Fix pack installation with semantic versioning

New features

- --force-reinstall flag to force pack installation
- Combine pack and psdc commands
- Make index-url mandatory
- Make index-url mandatory
- List commands using Yaml naming standard

# v0.4.1
Expand All @@ -204,11 +235,13 @@ a pack via PDSC file that is already installed
This v0.4 release contains:

Bug fixes

- Continue listing packs despite malformed pack names
- Do not raise error when installing a pack already installed
- Do not raise error when using non HTTPS url for updating index.pix

New features

- Avoid displaying progress bar on non-interactive terminals
- Remove extracted licenses when purging
- Add notes on how to configure cpackget behind a proxy
Expand All @@ -225,7 +258,7 @@ causing it not to display the version of cpackget.
This v0.3.0 release makes cpackget more verbose by default. This will
show pack installation progress on both downloading and decompressing.

It also supports gracefully ending an installation when hitting CTRL+C.
It also supports gracefully ending an installation when hitting CTRL+C.

Finally this release supports installing packs using only the pack name,
e.g. "ARM.CMSIS" or "ARM.CMSIS.5.7.0" in case a specific version is required.
Expand All @@ -234,6 +267,7 @@ e.g. "ARM.CMSIS" or "ARM.CMSIS.5.7.0" in case a specific version is required.

This v0.2.0 release makes cpackget capable of replacing cp_init and cp_install
in cbuild. It:

- adds an "init" subcommand that allows creation of the pack root installation directory (replaces cp_init.sh)
- supports embedded license agreement step before installing packs
- supports updating the public index in .Web/index.pidx
Expand Down
19 changes: 15 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Contributing to cpackget

We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
Expand All @@ -7,10 +8,14 @@ We want to make contributing to this project as easy and transparent as possible
- Proposing new features

## We develop with Github

We use Github to host code, track issues and feature requests, as well as accept pull requests.

## We use [Github flow](https://guides.github.com/introduction/flow/index.html), so all code changes happen through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
## We use [Github flow](https://guides.github.com/introduction/flow/index.html)

All code changes occur via Pull Requests.
Pull requests are the best way to propose changes to the codebase (we use
[Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. If you've added code that should be tested, add [tests](https://golang.org/pkg/testing/).
Expand All @@ -20,9 +25,12 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
6. Open a [pull request](https://github.com/Open-CMSIS-Pack/cpackget/pulls)!

## Report bugs using Github's [issues](https://github.com/Open-CMSIS-Pack/cpackget/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/Open-CMSIS-Pack/cpackget/issues/new).

We use GitHub issues to track public bugs. Report a bug by
[opening a new issue](https://github.com/Open-CMSIS-Pack/cpackget/issues/new).

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
Expand All @@ -34,4 +42,7 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

## Any contributions you make will be under the Apache 2.0 Software License
In short, when you submit code changes, your submissions are understood to be under the same [Apache 2.0 License](https://choosealicense.com/licenses/apache-2.0/) that covers the project. Feel free to contact the maintainers if that's a concern.

In short, when you submit code changes, your submissions are understood to be under the same
[Apache 2.0 License](https://choosealicense.com/licenses/apache-2.0/) that covers the project.
Feel free to contact the maintainers if that's a concern.
11 changes: 7 additions & 4 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Developing cpackget

Follow steps below to start developing for `cpackget`:

1. Requirements:
- [Install Make](https://www.gnu.org/software/make/)
- [Install Golang](https://golang.org/doc/install)
- [Install GolangCI-Lint](https://golangci-lint.run/usage/install/#local-installation)

- [Install Make](https://www.gnu.org/software/make/)
- [Install Golang](https://golang.org/doc/install)
- [Install GolangCI-Lint](https://golangci-lint.run/usage/install/#local-installation)

2. Clone the repo:
`$ git clone https://github.com/open-cmsis-pack/cpackget.git`
Expand All @@ -21,7 +23,8 @@ Follow steps below to start developing for `cpackget`:
6. Make sure it builds
`make build/cpackget`

7. Done! You can now start changing the source code, please refer to [contributing guide](CONTRIBUTING.md) to start contributing to the project
7. Done! You can now start changing the source code, please refer to
[contributing guide](CONTRIBUTING.md) to start contributing to the project

# Releasing

Expand Down
Loading

0 comments on commit df6647f

Please sign in to comment.