chore(spelling): add codespell pre-commit hook

Fixes spelling mistakes identified by it.
This commit is contained in:
Leroy Hopson 2024-03-29 23:55:53 +13:00
parent c9202f847e
commit 4ba9859a18
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
11 changed files with 20 additions and 15 deletions

View file

@ -18,3 +18,8 @@ repos:
hooks:
- id: gdformat
exclude: "^addons/gut/"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
exclude: ".*package-lock.json|.*demo.txt|.*fonts.*LICENSE|.*THIRDPARTY_NOTICES.*|.*.svg"

View file

@ -1,4 +1,4 @@
# For convenient building of the library and gdnative export templates targeted at the javacript platform.
# For convenient building of the library and gdnative export templates targeted at the javascript platform.
FROM emscripten/emsdk:3.1.14
RUN apt-get update && apt-get install pkg-config python3 -y
RUN pip3 install scons

View file

@ -224,7 +224,7 @@ Array PTYUnix::fork(String p_file, int _ignored, PoolStringArray p_args,
sigaction(i, &sig_action, NULL);
}
}
// reenable signals
// re-enable signals
pthread_sigmask(SIG_SETMASK, &oldmask, NULL);
if (pid) {
@ -671,4 +671,4 @@ void PTYUnix::_register_methods() {
register_method("process", &PTYUnix::process);
}
void PTYUnix::_init() {}
void PTYUnix::_init() {}

View file

@ -149,7 +149,7 @@ HRESULT CreateNamedPipesAndPseudoConsole(COORD size, DWORD dwFlags,
}
}
// Failed to find kernel32. This is realy unlikely - honestly no idea how
// Failed to find kernel32. This is really unlikely - honestly no idea how
// this is even possible to hit. But if it does happen, fall back to
// winpty.
return HRESULT_FROM_WIN32(GetLastError());
@ -180,7 +180,7 @@ static NAN_METHOD(PtyStartProcess) {
const bool inheritCursor = Nan::To<bool>(info[5]).FromJust();
// use environment 'Path' variable to determine location of
// the relative path that we have recieved (e.g cmd.exe)
// the relative path that we have received (e.g cmd.exe)
std::wstring shellpath;
if (::PathIsRelativeW(filename.c_str())) {
shellpath = path_util::get_shell_path(filename.c_str());

View file

@ -147,7 +147,7 @@ static NAN_METHOD(PtyStartProcess) {
}
// use environment 'Path' variable to determine location of
// the relative path that we have recieved (e.g cmd.exe)
// the relative path that we have received (e.g cmd.exe)
std::wstring shellpath;
if (::PathIsRelativeW(filename)) {
shellpath = path_util::get_shell_path(filename);

View file

@ -40,7 +40,7 @@ void Terminal::_populate_key_list() {
};
#endif
// Godot does not have seperate scancodes for keypad keys when NumLock is off.
// Godot does not have separate scancodes for keypad keys when NumLock is off.
// We can check the unicode value to determine whether it is off and set the
// appropriate scancode.
// Based on the patch which adds support for this to TextEdit/LineEdit:
@ -401,7 +401,7 @@ void Terminal::update_theme() {
Ref<Theme> default_theme;
/* Load the default theme if it exists and no theme is set */
// Don't actually set the theme to default (to allow inheritence of themes),
// Don't actually set the theme to default (to allow inheritance of themes),
// but do load default values from it.
const char *default_theme_path =

View file

@ -10,7 +10,7 @@ const LibuvUtils := preload("./libuv_utils.gdns")
static func get_os_environ() -> Dictionary:
# While Godot has OS.get_environment(), I could see a way to get all environent
# While Godot has OS.get_environment(), I could see a way to get all environment
# variables, other than by OS.execute() which would require to much platform
# specific code. Easier to use libuv's utility function.
return LibuvUtils.new().get_os_environ()

View file

@ -90,7 +90,7 @@ func _set_terminal(value: _Terminal):
if _terminal == value:
return
# Disconect the current terminal, if any.
# Disconnect the current terminal, if any.
if _terminal:
disconnect("data_received", _terminal, "write")
_terminal.disconnect("data_sent", self, "write")

View file

@ -201,5 +201,5 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
### Changed
- Implementation of Terminal node from GDScript to GDNative using [Aetf's patched version of libtsm](https://github.com/Aetf/libtsm).
- Move input handling to the Terminal node itself, rather than handling it in a seperate Control node.
- Move input handling to the Terminal node itself, rather than handling it in a separate Control node.
- The Terminal `write()` method now accepts both String and PoolByteArray.

View file

@ -34,7 +34,7 @@ uniform bool pixelate = true; // Fill each square (\"pixel\") with a sampled col
uniform bool roll = true;
uniform float roll_speed = 8.0; // Positive values are down, negative are up
uniform float roll_size : hint_range(0.0, 100.0) = 15.0;
uniform float roll_variation : hint_range(0.1, 5.0) = 1.8; // This valie is not an exact science. You have to play around with the value to find a look you like. How this works is explained in the code below.
uniform float roll_variation : hint_range(0.1, 5.0) = 1.8; // This value is not an exact science. You have to play around with the value to find a look you like. How this works is explained in the code below.
uniform float distort_intensity : hint_range(0.0, 0.2) = 0.05; // The distortion created by the rolling effect.
uniform float noise_opacity : hint_range(0.0, 1.0) = 0.4;
@ -52,7 +52,7 @@ uniform bool clip_warp = false;
uniform float vignette_intensity = 0.4; // Size of the vignette, how far towards the middle it should go.
uniform float vignette_opacity : hint_range(0.0, 1.0) = 0.5;
// Used by the noise functin to generate a pseudo random value between 0.0 and 1.0
// Used by the noise function to generate a pseudo random value between 0.0 and 1.0
vec2 random(vec2 uv){
uv = vec2( dot(uv, vec2(127.1,311.7) ),
dot(uv, vec2(269.5,183.3) ) );
@ -193,7 +193,7 @@ void fragment()
// We use roll_line (set above) to define how big the noise should be vertically (multiplying cuts off all black parts).
// We also add in some basic noise with random() to break up the noise pattern above. The noise is sized according to
// the resolution value set in the inspector. If you don't like this look you can
// change \"ceil(uv * resolution) / resolution\" to only \"uv\" to make it less pixelated. Or multiply resolution with som value
// change \"ceil(uv * resolution) / resolution\" to only \"uv\" to make it less pixelated. Or multiply resolution with some value
// greater than 1.0 to make them smaller.
roll_line *= noise * scanlines * clamp(random((ceil(uv * resolution) / resolution) + vec2(TIME * 0.8, 0.0)).x + 0.8, 0.0, 1.0);
// Add it to the texture based on noise_opacity

View file

@ -9,7 +9,7 @@
out=addons/godot_xterm/THIRDPARTY_NOTICES.txt
# List of licenses to be concatenated.
# Format (space seperated): Software name, Path to license file from git repo root.
# Format (space separated): Software name, Path to license file from git repo root.
# When compiling with option 'disable_pty=yes' libuv, node-pty and tmux can be omitted.
LICENSES=$(cat <<-END
godot ./misc/export_templates/godot/LICENSE.txt