Skip to content

Commit

Permalink
ci: link & spell check (#110)
Browse files Browse the repository at this point in the history
* link + codespell ci

* fix spelling

* fix broken links

* disable twitter lint

* merge spawn into cosmetic CI
  • Loading branch information
Reecepbcups authored Mar 21, 2024
1 parent 81be9d0 commit 656cc0b
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = *.pulsar.go,*.pb.go,*.pb.gw.go,*.json,*.git,*.bin,*.sum,*.mod
ignore-words-list = usera
count =
quiet-level = 3
35 changes: 35 additions & 0 deletions .github/workflows/cosmetic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: chores

on:
pull_request:

jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/[email protected]

typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run codespell
continue-on-error: true
run: |
# .codespellrc is used
sudo apt-get install codespell -y
codespell -w --config .codespellrc
exit $?
pr-title-format:
name: Lint PR Title
permissions:
pull-requests: read
statuses: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion cmd/spawn/local-interchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var LocalICCmd = &cobra.Command{
logger.Error("Error setting local-ic permissions", "err", err)
}

// set to use the current dir if it is not overrriden
// set to use the current dir if it is not overridden
if os.Getenv("ICTEST_HOME") == "" {
if err := os.Setenv("ICTEST_HOME", "."); err != nil {
logger.Error("Error setting ICTEST_HOME", "err", err)
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To get started, follow these steps:
git clone https://github.com/<Username>/spawn.git
```

3. Crate a new branch on your fork
3. Create a new branch on your fork

```sh
git checkout -b name/broad-description-of-feature
Expand Down Expand Up @@ -74,7 +74,7 @@ We welcome bug reports, feature requests, and other contributions to our project
## Pull requests
In almost all cases, you should target branch `main` with your work. In the event it spans multiple releases, we will backport to the previous release branch as well. This can be found in our [READMEs maintained branches](./README.md#maintained-branches).
In almost all cases, you should target the default branch with your work. In the event it spans multiple releases, we will backport to the previous release branch as well.
For internal branches, branch names should be prefixed with the author's name followed by a short description of the feature, eg. `name/feature-x`.

Expand Down
3 changes: 2 additions & 1 deletion docs/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Spawn Demo

[Spawn Introduction Article](http://TODO)
<!-- markdown-link-check-disable-next-line -->
[Spawn Introduction Article](https://x.com/rollchains/status/1767218100242427952)

Introducing spawn, the developer tool that gets your cosmos chain up and running quickly. Allowing you to focus on what matters: your product.

Expand Down
2 changes: 1 addition & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The simplest deployment is a single node. This is the easiest to set up and is t
- No scalability
- Insecure IBC

TODO: Add some options for easy deployment for single node deployments. If theres some GH action thing to deploy to a cloud that would be ideal.
TODO: Add some options for easy deployment for single node deployments. If there's some GH action thing to deploy to a cloud that would be ideal.

## Single Node with Horcrux

Expand Down
11 changes: 11 additions & 0 deletions simapp/.github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check Markdown links

on:
pull_request:

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/[email protected]
4 changes: 2 additions & 2 deletions simapp/app/params/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Package params defines the simulation parameters in the gaia.
It contains the default weights used for each transaction used on the module's
simulation. These weights define the chance for a transaction to be simulated at
any gived operation.
any given operation.
You can repace the default values for the weights by providing a params.json
You can replace the default values for the weights by providing a params.json
file with the weights defined for each of the transaction operations:
{
Expand Down
4 changes: 2 additions & 2 deletions simapp/app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ func TestAppImportExport(t *testing.T) {
failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skipPrefixes[keyName])
if !assert.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare in %q", keyName) {
for _, v := range failedKVBs {
t.Logf("store missmatch: %q\n", v)
t.Logf("store mismatch: %q\n", v)
}
t.FailNow()
}

t.Logf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), appKeyA, appKeyB)
if !assert.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(keyName, app.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) {
for _, v := range failedKVAs {
t.Logf("store missmatch: %q\n", v)
t.Logf("store mismatch: %q\n", v)
}
t.FailNow()
}
Expand Down
2 changes: 1 addition & 1 deletion simapp/contrib/devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $(STATIK):
@(cd /tmp && go install github.com/rakyll/[email protected])

# Install the runsim binary with a temporary workaround of entering an outside
# directory as the "go get" command ignores the -mod option and will polute the
# directory as the "go get" command ignores the -mod option and will pollute the
# go.{mod, sum} files.
#
# ref: https://github.com/golang/go/issues/30515
Expand Down
2 changes: 1 addition & 1 deletion simapp/proto/example/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ option go_package = "github.com/rollchains/simapp/x/example/types";

// GenesisState defines the module genesis state
message GenesisState {
// Params defines all the paramaters of the module.
// Params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
}

Expand Down
2 changes: 1 addition & 1 deletion spawn/file_content.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

type FileContent struct {
// The path from within the embeded FileSystem
// The path from within the embedded FileSystem
RelativePath string
// The new location of the file
NewPath string
Expand Down
2 changes: 1 addition & 1 deletion spawn/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (fc *FileContent) RemoveModuleFromText(removeText string, pathSuffix ...str
}

// if we are in a batch delete, then we need to continue until we find the close parenthesis or bracket
// (i.e. NewKeeper in app.go is a good example fo this)
// (i.e. NewKeeper in app.go is a good example of this)
if startBatchDelete {
fc.Logger.Debug("rm", "idx", idx, "line", line)

Expand Down

0 comments on commit 656cc0b

Please sign in to comment.