Skip to content

Commit

Permalink
Add spellchecking
Browse files Browse the repository at this point in the history
Fixes existing errors and sets up a dictionary of terms that we consider
to be valid spellings but are not in the aspell english dictionaries.
  • Loading branch information
SeanTAllen committed May 24, 2021
1 parent f1808de commit 2965ec6
Show file tree
Hide file tree
Showing 40 changed files with 370 additions and 255 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ jobs:
name: Lint markdown and yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout source
uses: actions/checkout@v2
- name: Lint codebase
uses: docker://github/super-linter:v3.8.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_MD: true
VALIDATE_YAML: true

check-spelling:
name: Spellcheck markdown
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Check spelling
uses: rojopolis/spellcheck-github-actions@e0dcc87bedf34ff10d6be443753f1c770bacbaa2
25 changes: 25 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
matrix:
- name: Markdown
aspell:
lang: en
dictionary:
wordlists:
- .spelling-wordlist.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: true
attributes:
- title
- alt
ignores:
- ':matches(code, pre)'
- 'code'
- 'pre'

sources:
- 'docs/**/*.md'
default_encoding: utf-8
80 changes: 80 additions & 0 deletions .spelling-wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
ABI
AOT
APIs
Akka
al
arity
bitwise
boolean
booleans
capybaras
compilable
dereference
deserialise
deserialised
deserialisation
deserialising
desugars
destructure
docstring
docstrings
else's
emptor
encodings
endian
et
FFI
finaliser
finalisers
GC
GDB
interoperable
invariants
JIT
JSON
lexically
LLDB
LLVM
Lua
MacOS
misremember
mixins
multibyte
namespace
OCaml
ok
ORCA
polymorphism
ponyc
Ponylang
PonyTest
POSIX
preprocessor
Reddit
reraise
runtime
sendable
sequentiality
snuck
substitutability
substring
subtype
subtypes
subtyping
supertype
struct
structs
TCP
TypeScript
unalias
unaliased
unaliasing
unary
unforgeable
unhandled
upcasts
variadic
Vimeo
whitespace
writeable
Zulip
6 changes: 3 additions & 3 deletions docs/appendices/compiler-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ The most useful options are `--debug`, `--path` or just `-p`, `--output` or just

`--output` or `-o` takes a directory name where the final binary is created.

`--docs` or -`g` creates a directory of the package with documentation in [readthedocs.org](http://readthedocs.org) format, i.e. markdown with nice navigation.
`--docs` or -`g` creates a directory of the package with documentation in [Read the Docs](http://readthedocs.org) format, i.e. markdown with nice navigation.

Let's study the documentation of the builtin stdlib:
Let's study the documentation of the builtin standard library:

```bash
pip install mkdocs
ponyc packages/stdlib --docs && cd stdlib-docs && mkdocs serve
```

And point your web browser to [http://127.0.0.1:8000](http://127.0.0.1:8000) serving a live-reloading local version of the docs.
And point your web browser to [127.0.0.1:8000](http://127.0.0.1:8000) serving a live-reloading local version of the docs.

Note that there is _no built-in debugger_ to interactively step through your program and interpret the results. But ponyc creates proper DWARF symbols and you can step through your programs with a conventional debugger, such as GDB or LLDB.

Expand Down
2 changes: 1 addition & 1 deletion docs/appendices/error-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ As an aside, while trying to figure out what is happening, you may have been mis

## A note on compiler versions

The error messages shown in this section are from ponyc 0.2.1-1063-g6ae110f [release], the current head of the main branch at the time this is written. The messages from other versions of the compiler may be different, to a greater or lesser degree.
The error messages shown in this section are from ponyc `0.2.1-1063-g6ae110f` release, the current head of the main branch at the time this is written. The messages from other versions of the compiler may be different, to a greater or lesser degree.
12 changes: 6 additions & 6 deletions docs/appendices/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

Small _how do I_ examples for Pony. These will eventually find another home. Until then, they live here.

## Enum with values
## Enumeration with values

```pony
primitive Black fun apply(): U32 => 0xFF000000
primitive Red fun apply(): U32 => 0xFFFF0000
```

## Enum with values with namespace
## Enumeration with values with namespace

```pony
primitive Colours
fun black(): U32 => 0xFF000000
fun red(): U32 => 0xFFFF0000
```

## Enum which can be iterated
## Enumeration which can be iterated

```pony
primitive Black
Expand All @@ -35,7 +35,7 @@ for colour in ColourList().values() do
end
```

## Pass an Array of values to FFI (TODO)
## Pass an Array of values to FFI

```pony
use @eglChooseConfig[U32](disp: Pointer[_EGLDisplayHandle], attrs: Pointer[U16] tag,
Expand Down Expand Up @@ -72,7 +72,7 @@ actor Main
try env.out.print(env.args(0)?) end
```

## How to use cli to parse command line arguments
## How to use the `cli` package to parse command line arguments

```pony
use "cli"
Expand Down Expand Up @@ -133,7 +133,7 @@ class iso _TestAddition is UnitTest
h.expect_eq[U32](2 + 2, 4)
```

Some assertions you can make with the TestHelper are
Some assertions you can make with `TestHelper` are

```pony
fun tag log(msg: String, verbose: Bool = false)
Expand Down
104 changes: 52 additions & 52 deletions docs/appendices/keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,61 @@ This listing explains the usage of every Pony keyword.

| Keyword | Usage |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| actor | defines an actor |
| as | conversion of a value to another Type (can raise an error) |
| be | behavior, executed asynchronously |
| box | default reference capability – object is readable, but not writable |
| break | to step out of a loop statement |
| class | defines a class |
| compile_error | will provoke a compile error |
| compile_intrinsic | implementation is written in C and not available as Pony code |
| continue | continues a loop with the next iteration |
| consume | move a value to a new variable, leaving the original variable empty |
| digestof | create a `USize` value that summarizes the Pony object, similar to a Java object's `hashCode()` value. |
| do | loop statement, or after a with statement |
| else | conditional statement in if, for, while, repeat, try (as a catch block), match |
| elseif | conditional statement, also used with ifdef |
| embed | embed a class as a field of another class |
| end | ending of: if then, ifdef, while do, for in, repeat until, try, object, lambda, recover, match |
| error | raises an error |
| for | loop statement |
| fun | define a function, executed synchronously |
| if | (1) conditional statement |
| `actor` | defines an actor |
| `as` | conversion of a value to another Type (can raise an error) |
| `be` | behavior, executed asynchronously |
| `box` | default reference capability – object is readable, but not writable |
| `break` | to step out of a loop statement |
| `class` | defines a class |
| `compile_error` | will provoke a compile error |
| `compile_intrinsic` | implementation is written in C and not available as Pony code |
| `continue` | continues a loop with the next iteration |
| `consume` | move a value to a new variable, leaving the original variable empty |
| `digestof` | create a `USize` value that summarizes the Pony object, similar to a Java object's `hashCode()` value. |
| `do` | loop statement, or after a with statement |
| `else` | conditional statement in if, for, while, repeat, try (as a catch block), match |
| `elseif` | conditional statement, also used with `ifdef` |
| `embed` | embed a class as a field of another class |
| `end` | ending of: `if then`, `ifdef`, `while do`, `for in`, `repeat until`, `try`, `object`, `recover`, `match` |
| `error` | raises an error |
| `for` | loop statement |
| `fun` | define a function, executed synchronously |
| `if` | (1) conditional statement |
| | (2) to define a guard in a pattern match |
| ifdef | when defining a build flag at compile time: ponyc –D "foo" |
| iftype | type conditional statement `iftype A <: B` checks if `A` is a subtype of `B` |
| in | used in a for in - loop statement |
| interface | used in structural subtyping |
| is | (1) used in nominal subtyping |
| `ifdef` | when defining a build flag at compile time: ponyc –D "foo" |
| `iftype` | type conditional statement `iftype A <: B` checks if `A` is a subtype of `B` |
| `in` | used in a for in - loop statement |
| `interface` | used in structural subtyping |
| `is` | (1) used in nominal subtyping |
| | (2) in type aliasing |
| | (3) identity comparison |
| isnt | negative identity comparison |
| iso | reference capability – read and write uniqueness |
| let | declaration of immutable variable: you can't rebind this name to a new value |
| match | pattern matching |
| new | constructor |
| not | logical negation |
| object | to make an object literal |
| primitive | declares a primitive type |
| recover | removes the reference capability of a variable |
| ref | reference capability – object (on which function is called) is mutable |
| repeat | loop statement |
| return | to return early from a function |
| tag | reference capability – neither readable nor writeable, only object identity |
| then | (1) in if conditional statement |
| `isnt` | negative identity comparison |
| `iso` | reference capability – read and write uniqueness |
| `let` | declaration of immutable variable: you can't rebind this name to a new value |
| `match` | pattern matching |
| `new` | constructor |
| `not` | logical negation |
| `object` | to make an object literal |
| `primitive` | declares a primitive type |
| `recover` | removes the reference capability of a variable |
| `ref` | reference capability – object (on which function is called) is mutable |
| `repeat` | loop statement |
| `return` | to return early from a function |
| `tag` | reference capability – neither readable nor writeable, only object identity |
| `then` | (1) in if conditional statement |
| | (2) as a (finally) block in try |
| this | the current object |
| trait | used in nominal subtyping: class Foo is TraitName |
| trn | reference capability – write uniqueness, no other actor can write to the object |
| try | error handling |
| type | to declare a type alias |
| until | loop statement |
| use | (1) using a package |
| `this` | the current object |
| `trait` | used in nominal subtyping: `class Foo is TraitName` |
| `trn` | reference capability – write uniqueness, no other actor can write to the object |
| `try` | error handling |
| `type` | to declare a type alias |
| `until` | loop statement |
| `use` | (1) using a package |
| | (2) using an external library foo: use "lib:foo" |
| | (3) declaration of an FFI signature |
| | (4) add a search path for external libraries: use "path:/usr/local/lib" |
| var | declaration of mutable variable: you can rebind this name to a new value |
| val | reference capability – globally immutable object |
| where | when specifying named arguments |
| while | loop statement |
| with | ensure disposal of an object |
| | (4) add a search path for external libraries: `use "path:/usr/local/lib"` |
| `var` | declaration of mutable variable: you can rebind this name to a new value |
| `val` | reference capability – globally immutable object |
| `where` | when specifying named arguments |
| `while` | loop statement |
| `with` | ensure disposal of an object |
Loading

0 comments on commit 2965ec6

Please sign in to comment.