Skip to content

Commit

Permalink
CI: check for typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
black-sliver committed Nov 3, 2024
1 parent b657c1d commit b1a51f7
Show file tree
Hide file tree
Showing 28 changed files with 88 additions and 59 deletions.
4 changes: 4 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# game abbreviations
som
# variable names
ot
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = ./.git,./packs,./nbproject,./lib,./build,./win32-lib,./win32-lib-src,./scan-build-reports,node_modules,./examples/template_pack/scripts/custom_items/class.lua,*.pem
ignore-words = ./.codespellignore
17 changes: 17 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Codespell

on:
push:
pull_request:

jobs:
codespell:
runs-on: ubuntu-latest
name: Find typos

steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
check_hidden: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install coreutils SDL2 sdl2_ttf sdl2_image [email protected] googletest || true
- name: Install extra dependencies (brewo)
- name: Install extra dependencies (brew)
if: ${{ startsWith(matrix.os, 'macos') && contains(matrix.extra_make_args, 'MACOS_DEPLOYMENT_TARGET') }}
run: |
brew install boost || true
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ screenshots
packlist
pop-pack-create-versions

# exclude tool chain dependant files
# exclude tool chain dependent files
win32-lib
win32-lib-src
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Dependencies to build the bundle: install git and `brew install automake libtool
The release builds for Windows and macOS are very custom since we do not want to force msys or brew on anyone and use a
gnu toolchain for development.

* Meson's submodules system would be great, but some of them are very outdated or incomplete and maintinaing the recipes
* Meson's submodules system would be great, but some of them are very outdated or incomplete and maintaining the recipes
for all dependencies is too much work.
* CMake did fail when trying to create the static windows build, at which point we'd need to modify and maintain CMake
files for subprojects.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* Lua: Added LocationSection.FullID to get the full location/section string
* Added flag "apmanual" to enable sending in Archipelago
* Fixes
* Fix map tooltip placement being wrong under certain cirumstances
* Fix map tooltip placement being wrong under certain circumstances
* Fix sections with sequence break + inspect not showing up correctly
* Fix a race condition in snes autotracking
* Ignore "allow_disabled" for items where behavior wasn't documented: toggle, static, toggle_badged
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Send PRs on GitHub.
- public member variables should start with a lower case letter - this is to match SDL's structs
- public member variables should only be used for simple structs - use getters/setters otherwise
- getters start with `get`, setters with `set`
- class names start with a captial letter
- one exception to the above is the Lua Inferface, which uses `T::Lua_CamelCase`
- class names start with a capital letter
- one exception to the above is the Lua Interface, which uses `T::Lua_CamelCase`
- loops/iterations use `auto :` or `auto& :` where possible
- use `std::string` or `std::string_view` (we target c++17)
- there are a ton of violations, but new code should still try to check all the boxes
Expand Down Expand Up @@ -71,6 +71,11 @@ See [scan-build.yaml](../.github/workflows/scan-build.yaml).

Consider testing with ASAN.

### Spell checker

We use codespell to find typos. You can `pip install codespell` or reply on the GitHub workflow.
See `.codespellrc` if you want to exclude files/folders and `.codespellignore` if you want to exclude a word.

## Documentation Style

Markdown per [Google Markdown style guide](https://google.github.io/styleguide/docguide/style.html)
Expand Down
6 changes: 3 additions & 3 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Credits

## Code Contibutors
## Code Contributors

* [black-sliver](https://github.com/black-sliver)
* [sbzappa](https://github.com/sbzappa)
* [coavins](https://github.com/coavins/)

## Other Contributors

* [Cyb3R](https://github.com/Cyb3RGER) - the new icon + figuring out, testing and brainstorming all teh stuff, also schema.
* [Cyb3R](https://github.com/Cyb3RGER) - the new icon + figuring out, testing and brainstorming all the stuff, also schema.
* [jsd1982](https://github.com/JamesDunne) & [total](https://github.com/tewtal) - providing snes/sni/usb2snes infos
* [MisterIbis]( https://github.com/MisterIbis) - doing some documenation
* [MisterIbis]( https://github.com/MisterIbis) - doing some documentation

## Libraries

Expand Down
4 changes: 2 additions & 2 deletions api/lua/definition/poptracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function ScriptHost:RemoveWatchForCode(name) end

---callback(store, {variableName, ...}) will be called whenever a remote variable changes.
---See [AUTOTRACKING.md](https://github.com/black-sliver/PopTracker/blob/master/doc/AUTOTRACKING.md#variable-interface-uat)
-- and [UAT REDME.md](https://github.com/black-sliver/UAT/blob/master/README.md) for more info.
-- and [UAT README.md](https://github.com/black-sliver/UAT/blob/master/README.md) for more info.
---@param name string identifier/name of this watch
---@param variables string[] array of variable names
---@param callback fun(store:VariableStore, changedKeysArray:table):nil called when any watched variable changes
Expand Down Expand Up @@ -449,7 +449,7 @@ ImageRef = {}
ImageReference = {}

---Create an image reference from filename.
---Note: currently path resultion happens when the ImageRef is being used, so there is no way to detect errors.
---Note: currently path resolution happens when the ImageRef is being used, so there is no way to detect errors.
---@param filename string
---@return ImageRef reference to the image for filename
function ImageReference:FromPackRelativePath(filename) end
Expand Down
4 changes: 2 additions & 2 deletions doc/PACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ The following interfaces are provided:
* `require` behaves mostly like Lua require since 0.25.6
* `"foo.baz"` will try `/scripts/foo/baz.lua`, `/scripts/foo/baz/init.lua`, `/foo/baz.lua` and `/foo/baz/init.lua`
* `...` contains mod name for relative require since 0.25.6
* `ref :AddMemoryWatch(name,addr,len,callback,interal)`: add a memory watch for auto-tracking, see [AUTOTRACKING.md](AUTOTRACKING.md)
* `ref :AddMemoryWatch(name,addr,len,callback,interval)`: add a memory watch for auto-tracking, see [AUTOTRACKING.md](AUTOTRACKING.md)
* `bool :RemoveMemoryWatch(name)`: remove memory watch by name, available since 0.11.0
* `ref :AddVariableWatch(name,{variables, ...},callback,interal)`: add a variable watch for auto-tracking, see [AUTOTRACKING.md](AUTOTRACKING.md)
* `ref :AddVariableWatch(name,{variables, ...},callback,interval)`: add a variable watch for auto-tracking, see [AUTOTRACKING.md](AUTOTRACKING.md)
* `bool :RemoveVariableWatch(name)`: remove variable watch by name, available since 0.16.0
* `ref :AddWatchForCode(name,code,callback)`: callback(code) will be called whenever an item changed state that canProvide(code). Only available in PopTracker, since 0.11.0, will return a reference (name) to the watch since 0.18.2. Use "*" to trigger for all codes since 0.25.5.
* `bool :RemoveWatchForCode(name)`: remove watch by name
Expand Down
2 changes: 1 addition & 1 deletion doc/PackCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ As the documentation mentioned, the init.lua script grabs the .json files, and f

If you don’t know where to start, items and maps don’t require anything else done first. Any items that have logical implications need to have an item created for them. Anything that you might have to check your inventory for would also be a good candidate. Anything that you never need later should generally not be an item. Bosses that you have to kill can also be an Item – this way they can have a nice icon instead of just being a random chest.

You can start with placeholder images for items. For Maps, best practices are to use a quick placeholder to make sure they’re loading, and you’ll want to have them finalized by the time you’re doing a second pass on the locations file. There's not a requirement to have placeholder images, but iterating on a quick test is generally a good way to prevent major unforseen issues.
You can start with placeholder images for items. For Maps, best practices are to use a quick placeholder to make sure they’re loading, and you’ll want to have them finalized by the time you’re doing a second pass on the locations file. There's not a requirement to have placeholder images, but iterating on a quick test is generally a good way to prevent major unforeseen issues.

Reminder again, **valid image types are PNG, GIF, and JPEG.** Generally speaking, you should prefer to create static images as PNG over JPEG since they can include transparency and are lossless. If you’ve already got something in another valid format then it’s probably fine as-is. Item image sizes should generally be 32 x 32, though up to 64 x 64 is still fine if you have text that needs to be readable.
- For Future You’s sanity, please pick image names that are concise, descriptive and separate words with an underscore if you need multiple words to be descriptive (eg map_name). This isn't a hard rule, but it'll make life easier for anyone who needs to read the pack later on.
Expand Down
2 changes: 1 addition & 1 deletion examples/uat-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ PopTracker to auto-track.
* Variables are received in [scripts/autotracking.lua](scripts/autotracking.lua)
* Sample server is in [util/uat-example-server.py](util/uat-example-server.py)

Load the pack and run the example server for a demonstation. The example server
Load the pack and run the example server for a demonstration. The example server
requires python3 and websockets module (`pip install -r util/requirements.txt`).
10 changes: 5 additions & 5 deletions schema/packs/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"type": "string"
},
"img_mods": {
"description": "Modifiers to apply to the image. Multiple values are comma seperated.",
"description": "Modifiers to apply to the image. Multiple values are comma separated.",
"examples": [
"@disabled",
"overlay|path/to/img.png"
Expand All @@ -91,15 +91,15 @@
"type": "string"
},
"disabled_img_mods": {
"description": "Modifiers to apply to the image when disabled. Multiple values are comma seperated.",
"description": "Modifiers to apply to the image when disabled. Multiple values are comma separated.",
"examples": [
"@disabled",
"overlay|path/to/img.png"
],
"type": "string"
},
"codes": {
"description": "Code identifier(s) of this item. Multiple values are comma seperated.",
"description": "Code identifier(s) of this item. Multiple values are comma separated.",
"examples": [
"code1",
"code1,code2",
Expand Down Expand Up @@ -127,7 +127,7 @@
"$ref": "#/$defs/codes"
},
"secondary_codes": {
"description": "Secondary code identifier(s) of this item. Multiple values are comma seperated. Unused at the moment.",
"description": "Secondary code identifier(s) of this item. Multiple values are comma separated. Unused at the moment.",
"examples": [
"code1",
"code1,code2",
Expand Down Expand Up @@ -238,7 +238,7 @@
"$ref": "#/$defs/stages"
},
"allow_disabled": {
"description": "Automatically adds a \"off\" stage if set to true.",
"description": "Automatically adds an \"off\" stage if set to true.",
"anyOf": [
{
"type": "boolean",
Expand Down
4 changes: 2 additions & 2 deletions schema/packs/layouts.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
]
},
"canvas_top": {
"description": "Distance to top egde of canvas of the item.",
"description": "Distance to top edge of canvas of the item.",
"anyOf": [
{
"type": "number"
Expand All @@ -164,7 +164,7 @@
]
},
"canvas_left": {
"description": "Distance to left egde of canvas of the item.",
"description": "Distance to left edge of canvas of the item.",
"anyOf": [
{
"type": "number"
Expand Down
Loading

0 comments on commit b1a51f7

Please sign in to comment.