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

add vale #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Linting with Vale on pull request
on: [pull_request]

jobs:
vale:
name: Linting with Vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: errata-ai/[email protected]
with:
# filter_mode: diff_context
vale_flags: "--no-exit --minAlertLevel=error"
reporter: github-pr-review
fail_on_error: true
env:
# Required, set by GitHub actions automatically:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vale.ini
9 changes: 7 additions & 2 deletions README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Rootstock.rootstock-product-names] Use 'Rootstock' instead of 'RSK'

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Rootstock.rootstock-domains] Use 'rootstock.io' domain in 'Run the following command, replacing https://public-node.testnet.rsk.co with either rskTestnet or rskMainnet rpc url if you have the testnet and mainnet environments configured for your desired deployment environment, for this guide, we will use the public node url'

Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ Before starting the dApp, make sure to have the following prerequisites:
- Precompiled binaries can be downloaded from the Foundry [GitHub releases page](https://github.com/foundry-rs/foundry/releases). For easier management, we recommend using Foundryup.

To install Foundry in your system, run the following command:
```bash

```bash

curl -L https://foundry.paradigm.xyz | bash

```

This will install Foundryup. Follow the on-screen instructions, and the `foundryup` command will be available via the CLI.

Running `foundryup` automatically installs the latest (nightly) versions of the precompiled binaries: `forge`, `cast`, `anvil`, and `chisel`. For additional options, such as installing a specific version or commit, run `foundryup --help`.
Expand Down Expand Up @@ -113,6 +117,7 @@ Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 8.73ms (1.51ms CPU

Ran 1 test suite in 143.90ms (8.73ms CPU time): 2 tests passed, 0 failed, 0 skipped (2 total tests)
```

**_NOTE: If you need additional tests, or want to go deep on this step, visit the [Foundry Tests Documentation](https://book.getfoundry.sh/forge/tests)._**

## Deploying an ERC20 Token Contract
Expand All @@ -124,7 +129,7 @@ Run the following command, replacing `https://public-node.testnet.rsk.co` with e
forge script script/Deploy.s.sol --rpc-url https://public-node.testnet.rsk.co --broadcast --legacy --evm-version london
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Rootstock.rootstock-domains] Use 'rootstock.io' domain in 'forge script script/Deploy.s.sol --rpc-url https://public-node.testnet.rsk.co --broadcast --legacy --evm-version london'

```
:::info[Info]

- Rsk is best.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Rootstock.rootstock-product-names] Use 'Rootstock' instead of 'Rsk'

- [EIP-1559](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md) is not supported or not activated on the Rootstock RPC url.
- To avoid Foundry's compatibility issues, we are using the `--evm-version london` flag.
- The `--legacy` flag is passed to use legacy transactions instead of `EIP-1559`.
Expand Down
96 changes: 96 additions & 0 deletions styles/Canonical/001-English-words-spelling-suggestions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
extends: substitution
message: "Use British English spelling, '%s' instead of '%s'."
link: https://docs.ubuntu.com/styleguide/en/#spelling
ignorecase: true
level: suggestion
action:
name: replace
swap:
'acknowledgment': acknowledgement
'airplane': aeroplane
'aluminum': aluminium
'analog': analogue
'analyze': analyse
'annex': annexe
'apologize': apologise
'armor': armour
'authorization': authorisation
'authorize': authorise
'authorizer': authoriser
'behavior': behaviour
'canceled': cancelled
'capitalize': 'capitalise'
'catalog': catalogue
'center': centre
'checker': chequer
'cipher': cypher
'color': colour
'counseling': counselling
'counselor': counsellor
'defense': defence
'dialed': dialled
'dialer': dialler
'emphasize': emphasise
'encyclopedia': encyclopaedia
'endeavor': endeavour
'enrollment': enrolment
'equaling': equalling
'favor': favour
'favorite': favourite
'fiber': fibre
'flakey': flaky
'flavor': flavour
'fulfill': fulfil
'furor': furore
'generalize': generalise
'glycerin': glycerine
'gray': grey
'harbor': harbour
'harmonization': harmonisation
'harmonize': harmonise
'honor': honour
'humor': humour
'in side': inside
'industrialize': industrialise
'installment': instalment
'italicize': italicise
'judgment': judgement
'kilometer': kilometre
'labeled': labelled
'labor': labour
'liter': litre
'lodgement': lodgment
'maneuver': manoeuvre
'modeling': modelling
'mold': mould
'monolog': monologue
'offense': offence
'organization': organisation
'oriented': orientated
'parlor': parlour
'percent': per cent
'plow': plough
'pretense': pretence
'quarreled': quarrelled
'quarreling': quarrelling
'realization': realisation
'realize': realise
'recognize': recognise
'rumor': rumour
'sausages, beans, and mash': sausages, beans and mash
'signaling': signalling
'skeptic': sceptic
'skeptical': sceptical
'skillful': skilful
'specialty': speciality
'theater': theatre
'tranquility': tranquillity
'traveled': travelled
'traveler': traveller
'traveling': travelling
'urbanization': urbanisation
'virtualize': virtualise
'virtualization': virtualisation
'woolen': woollen
'yogurt': yoghurt

67 changes: 67 additions & 0 deletions styles/Canonical/003-Ubuntu-names-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
extends: existence
message: |
Please use the Ubuntu product name correctly. E.g. Ubuntu 22.04 LTS, Ubuntu
22.10, Ubuntu 23.04 (Lunar Lobster), Ubuntu 23.10 (Mantic), Ubuntu 24.04 LTS
(Noble Numbat).
link: https://docs.ubuntu.com/styleguide/en/#ubuntu
nonword: true
ignorecase: true
scope:
- sentence
- heading
- table
level: error
tokens:
# LTS releases should be followed by "LTS" suffix.
- 'Ubuntu (24|22|20|18|16|14|12|10|8)\.04(?! LTS)'
- 'Ubuntu 6\.06(?! LTS)'
# Non-LTS releases should not be followed by "LTS" suffix.
- 'Ubuntu (23|22|21|20|19|18|17|16|15|14|13|12|11|10|9|8|7|6\5\4)\.10 LTS'
- 'Ubuntu (23|21|19|17|15|13|11|10|9|8|7|5)\.04 LTS'
- 'Ubuntu 6\.06 LTS'
# All releases should match the code name.
- 'Ubuntu 24\.10 \((?!(Oracular|Oracular Oriole)\))'
- 'Ubuntu 24\.04 LTS \((?!(Noble|Noble Numbat)\))'
- 'Ubuntu 23\.10 \((?!(Mantic|Mantic Minotaur)\))'
- 'Ubuntu 23\.04 \((?!(Lunar|Lunar Lobster)\))'
- 'Ubuntu 22\.10 \((?!(Kinetic|Kinetic Kudu)\))'
- 'Ubuntu 22\.04 LTS \((?!(Jammy|Jammy Jellyfish)\))'
- 'Ubuntu 21\.10 \((?!(Impish|Impish Indri)\))'
- 'Ubuntu 21\.04 \((?!(Hirsute|Hirsute Hippo)\))'
- 'Ubuntu 20\.10 \((?!(Groovy|Groovy Gorilla)\))'
- 'Ubuntu 20\.04 LTS \((?!(Focal|Focal Fossa)\))'
- 'Ubuntu 19\.10 \((?!(Eoan|Eoan Ermine)\))'
- 'Ubuntu 19\.04 \((?!(Disco|Disco Dingo)\))'
- 'Ubuntu 18\.10 \((?!(Cosmic|Cosmic Cuttlefish)\))'
- 'Ubuntu 18\.04 LTS \((?!(Bionic|Bionic Beaver)\))'
- 'Ubuntu 17\.10 \((?!(Artful|Artful Aardvark)\))'
- 'Ubuntu 17\.04 \((?!(Zesty|Zesty Zapus)\))'
- 'Ubuntu 16\.10 \((?!(Yakkety|Yakkety Yak)\))'
- 'Ubuntu 16\.04 LTS \((?!(Xenial|Xenial Xerus)\))'
- 'Ubuntu 15\.10 \((?!(Wily|Wily Werewolf)\))'
- 'Ubuntu 15\.04 \((?!(Vivid|Vivid Vervet)\))'
- 'Ubuntu 14\.10 \((?!(Utopic|Utopic Unicorn)\))'
- 'Ubuntu 14\.04 LTS \((?!(Trusty|Trusty Tahr)\))'
- 'Ubuntu 13\.10 \((?!(Saucy|Saucy Salamander)\))'
- 'Ubuntu 13\.04 \((?!(Raring|Raring Ringtail)\))'
- 'Ubuntu 12\.10 \((?!(Quantal|Quantal Quetzal)\))'
- 'Ubuntu 12\.04 LTS \((?!(Precise|Precise Pangolin)\))'
- 'Ubuntu 11\.10 \((?!(Oneiric|Oneiric Ocelot)\))'
- 'Ubuntu 11\.04 \((?!(Natty|Natty Narwhal)\))'
- 'Ubuntu 10\.10 \((?!(Maverick|Maverick Meerkat)\))'
- 'Ubuntu 10\.04 \((?!(Lucid|Lucid Lynx)\))'
- 'Ubuntu 10\.04 LTS \((?!(Lucid|Lucid Lynx)\))'
- 'Ubuntu 9\.10 \((?!(Karmic|Karmic Koala)\))'
- 'Ubuntu 9\.04 \((?!(Jaunty|Jaunty Jackalope)\))'
- 'Ubuntu 8\.10 \((?!(Intrepid|Intrepid Ibex)\))'
- 'Ubuntu 8\.04 LTS \((?!(Hardy|Hardy Heron)\))'
- 'Ubuntu 8\.04 \((?!(Hardy|Hardy Heron)\))'
- 'Ubuntu 7\.10 \((?!(Gutsy|Gutsy Gibbon)\))'
- 'Ubuntu 7\.04 \((?!(Feisty|Feisty Fawn)\))'
- 'Ubuntu 6\.10 \((?!(Edgy|Edgy Eft)\))'
- 'Ubuntu 6\.06 LTS \((?!(Dapper|Dapper Drake)\))'
- 'Ubuntu 6\.06 \((?!(Dapper|Dapper Drake)\))'
- 'Ubuntu 5\.10 \((?!(Breezy|Breezy Badger)\))'
- 'Ubuntu 5\.04 \((?!(Hoary|Hoary Hedgehog)\))'
- 'Ubuntu 4\.10 \((?!(Warty|Warty Warthog)\))'

28 changes: 28 additions & 0 deletions styles/Canonical/004-Canonical-product-names.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
extends: substitution
message: "Use '%s' instead of '%s'"
link: https://docs.ubuntu.com/styleguide/en/#other-canonical-products
ignorecase: true
level: error
action:
name: replace
swap:
Anbox Cloud: Anbox Cloud
Anbox: Anbox
Charmed Kubeflow: Charmed Kubeflow
Canononical Observability Stack: Canonical Observability Stack
Juju: Juju
Landscape: Landscape
Launchpad: Launchpad
LXD: LXD
MAAS: MAAS
MicroCeph: MicroCeph
MicroCloud: MicroCloud
MicroK8s: MicroK8s
MicroOVN: MicroOVN
MicroStack: MicroStack
Multipass: Multipass
Snapcraft: Snapcraft
snapd: snapd
Ubuntu Core: Ubuntu Core
Ubuntu Pro: Ubuntu Pro
Ubuntu Server: Ubuntu Server
20 changes: 20 additions & 0 deletions styles/Canonical/005-Industry-product-names.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
extends: substitution
message: "Use '%s' instead of '%s'"
link: https://docs.ubuntu.com/styleguide/en/#other-commonly-referenced-products/projects
ignorecase: true
level: error
action:
name: replace
swap:
nVidia : 'NVIDIA'
Openstack : 'OpenStack'
Postgresql : 'PostgreSQL'
Kuberentes : 'Kubernetes'
Aws : 'AWS'
Mysql : 'MySQL'
docker : 'Docker'
KubeFlow : 'Kubeflow'
Google cloud : 'Google Cloud Platform'
Influxdb : 'InfluxDB'
MM : 'Mattermost'

19 changes: 19 additions & 0 deletions styles/Canonical/006-Contractions-forbidden.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 06 - Contractions - Do not use these

extends: substitution
message: "Consider using '%s' instead of '%s'"
link: https://docs.ubuntu.com/styleguide/en#don't-use-these!
level: warning
ignorecase: true
swap:
ain[`']t: isn't
how[`']d: how did
how[`']ll: how will
I[`']d: one would
something[`']s: something is
mayn[`']t: may not
may[`']ve: may have
mightn[`']t: might not
might[`']ve: might have
gonna: going to
gotta: got to
42 changes: 42 additions & 0 deletions styles/Canonical/007-Headings-sentence-case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
extends: capitalization
# Fork of Google style guide rule
message: "'%s' should use sentence-style capitalisation."
link: "https://docs.ubuntu.com/styleguide/en/#sentence-case"
level: error
scope: heading
match: $sentence
exceptions:
- Azure
- CLI
- Cosmos
- Docker
- Emmet
- gRPC
- I
- Kubernetes
- Linux
- macOS
- Marketplace
- MongoDB
- REPL
- Studio
- TypeScript
- URLs
- Windows
- MAAS
- Juju
- Snapcraft
- LXD
- Landscape
- "Snap Store Proxy"
- Mir
- Multipass
- Cloud-init
- Dqlite
- MicroK8s
- "Charmed Kubernetes"
- Netplan
- "Charmed OpenStack"
- MicroStack
- "Anbox Cloud"
- "Ubuntu Server"
15 changes: 15 additions & 0 deletions styles/Canonical/008-Headings-no-period.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 01 - Heading - Do not end with '.'

extends: existence
message: "Don't use end punctuation in headings."
link: https://docs.ubuntu.com/styleguide/en#headings
nonword: true
level: warning
scope: heading
action:
name: edit
params:
- remove
- '.'
tokens:
- '[a-z0-9][.](?:\s|$)'
21 changes: 21 additions & 0 deletions styles/Canonical/009-Headings-no-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 09 - Heading - Headings should not contain links

extends: existence
message: "Headings should not contain links"
link: https://docs.ubuntu.com/styleguide/en/#other-considerations
nonword: true
level: warning
scope: raw
tokens:
- '[\#]+ [ \w]+\[[\w]+[ \w]*\]\([.\w]+\)'
- '[ \w]+\[[\w]+[ \w]*\]\([.\w]+\)[^\n]*\n[=-]{2,}\n'
- '[\#]+ [ \w]+<http[^\n]+>'
- '[ \w]+<http[^\n]+>[^\n]*\n[=-]{2,}\n'
- '[ \w]+`[ \w]*<[\.a-zA-Z0-9\/]+>`_[ \w]*\n(.)\1{3,}\n'
- '[ \w]+[ \w]*<[:\.a-zA-Z0-9\/]+>[ \w]*\n(.)\2{3,}\n'
- '[ \w]+\:ref\:`[^\n]+`[ \w]*\n(.)\3{3,}\n'
- '[ \w]+\:doc\:`[^\n]+`[ \w]*\n(.)\4{3,}\n'
- '[ \w]+\{ref\}`[^\n]+`[ \w]*\n(.)\5{3,}\n'
- '[ \w]+\{doc\}`[^\n]+`[ \w]*\n(.)\6{3,}\n'
- '[^\n]*https?:\/\/[^\n]*\n(.)\7{3,}\n'
- '[^\n]*www\.[^\n]*\n(.)\8{3,}\n'
14 changes: 14 additions & 0 deletions styles/Canonical/010-Punctuation-double-spaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 10 - Punctuation - No double space after '.', `?`, or `!`

extends: existence
message: "'%s' should have one space."
link:
level: warning
nonword: true
tokens:
- '[a-z][.?!] {2,}[A-Z]'

# Reasoning:
# We appreciate that you may have been taught to put two spaces after a
# full point/period/full stop. There is no need to and very little
# point. Most documentation parsers remove double-spaces anyway.
Loading
Loading