Skip to content

Commit

Permalink
janitor: Go over our spell checking setup
Browse files Browse the repository at this point in the history
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
  • Loading branch information
hunger committed Oct 16, 2023
1 parent ef39adc commit b12575a
Show file tree
Hide file tree
Showing 84 changed files with 236 additions and 219 deletions.
4 changes: 2 additions & 2 deletions .github/actions/install-linux-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
required: false
default: "no"
old-ubuntu:
description: "This is running on an older verison of Ubuntu"
description: "This is running on an older version of Ubuntu"
required: false
default: "no"

Expand All @@ -34,7 +34,7 @@ runs:
run: |
sudo apt-get update
sudo apt-get install libseat-dev libsystemd-dev
shell: bash
shell: bash
- name: Install C++ compiler
if: ${{ (runner.os == 'Linux') && (inputs.force-gcc-10 == 'true') }}
run: |
Expand Down
12 changes: 6 additions & 6 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# Frequently Asked Questions: <!-- omit in toc -->

- [General](#general)
- [Why does Slint use a domain specific langauage?](#why-does-slint-use-a-domain-specific-langauage)
- [Why does Slint use a domain specific language?](#why-does-slint-use-a-domain-specific-language)
- [Will there be API bindings to integrate with my favorite programming language?](#will-there-be-api-bindings-to-integrate-with-my-favorite-programming-language)
- [Licensing](#licensing)
- [Royalty-free license](#royalty-free-license)
- [Who can use the Royalty-free license?](#who-can-use-the-royalty-free-license)
- [What obligations do I need to fulfil to use the Royalty-free license?](#what-obligations-do-i-need-to-fulfil-to-use-the-royalty-free-license)
- [Are there any limitations with the Royalty-free license?](#are-there-any-limitations-with-the-royalty-free-license)
- [Scenario: What happens if my application is open-source (e.g. under MIT), forked by a different person and then redistributed?](#scenario-what-happens-if-my-application-is-open-source-eg-under-mit-forked-by-a-different-person-and-then-redistributed)
- [How are modifications to Slint itself covered under this licence?](#how-are-modifications-to-slint-itself-covered-under-this-licence)
- [How are modifications to Slint itself covered under this license?](#how-are-modifications-to-slint-itself-covered-under-this-license)
- [If Slint were to be taken over by a larger company or the current owners were to have a change of heart, can they revoke existing licenses?](#if-slint-were-to-be-taken-over-by-a-larger-company-or-the-current-owners-were-to-have-a-change-of-heart-can-they-revoke-existing-licenses)
- [GPLv3](#gplv3)
- [If I link my program with Slint GPLv3, does it mean that I have to license my program under the GPLv3, too?](#if-i-link-my-program-with-slint-gplv3-does-it-mean-that-i-have-to-license-my-program-under-the-gplv3-too)
Expand All @@ -27,7 +27,7 @@

## General

### Why does Slint use a domain specific langauage?
### Why does Slint use a domain specific language?

From our long experience of building UI toolkits, we have learnt that a domain
specific, declarative language is best suited to describe UIs. The Slint language
Expand Down Expand Up @@ -73,12 +73,12 @@ There are 2 limitations:

1. You are not permitted to distribute or make Slint publicly available alone and without integration into an application. For this purpose you may use the Software under the GNU General Public License, version 3.
2. You are not permitted the use Slint within Embedded Systems. An Embedded System is a computer system designed to perform a specific task within a larger mechanical or electrical system. For the purposes of this license, mobile phones are not considered to be Embedded Systems.

#### Scenario: What happens if my application is open-source (e.g. under MIT), forked by a different person and then redistributed?

The license does not restrict users on how they license their application. In the above scenario, the user may choose to use MIT-license for their application, which can be forked by a different person and then redistributed. If the forked application also uses Slint, then the person forking the application can also use the Royalty-free license as long as the obligations are fulfilled. Alternatively, the person may use one of the other Slint license options such as commercial or GPLv3.

#### How are modifications to Slint itself covered under this licence?
#### How are modifications to Slint itself covered under this license?

The license does not restrict 'if' and 'how' the modifications to Slint should be distributed. Say for example, Alice uses Slint under this new license to develop application A and modifies Slint in some way. She may choose to release the modifications to Slint under any license of her choice including any of the open source licenses. Alternatively she may decide not to release the modifications.

Expand Down Expand Up @@ -120,7 +120,7 @@ Under GPLv3. While the different software modules can remain under any license c

Alice can add a note that Bob can distribute BobApp under a proprietary license if he either acquires a Slint proprietary license or removes the dependency to Slint.

## Miscelleneous
## Miscellaneous

### Do you provide Support?

Expand Down
4 changes: 2 additions & 2 deletions api/cpp/docs/cmake.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->
<!-- cSpell: ignore ccmake dslint femtovg skia winit -->
<!-- cSpell: ignore ccmake dslint femtovg -->

# Installing Or Building With CMake

Expand Down Expand Up @@ -43,7 +43,7 @@ First you need to install the prerequisites:

* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). If you already
have Rust installed, make sure that it's at least version 1.60 or newer. You can check which version you have installed
by running `rustc --version`. Once this is done, you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
by running `rustc --version`. Once this is done, you should have the `rustc` compiler and the `cargo` build system installed in your path.
* **[cmake](https://cmake.org/download/)** (3.21 or newer)
* A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows)

Expand Down
2 changes: 1 addition & 1 deletion api/cpp/include/slint-platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AbstractRenderer
///
/// If the implementation of this bi-directional message passing protocol is incomplete, the user
/// may experience unexpected behavior, or the intention of the developer calling functions on the
/// Window API may not be fullfilled.
/// Window API may not be fulfilled.
///
/// Your WindowAdapter subclass must hold a renderer (either a SoftwareRenderer or a SkiaRenderer).
/// In the renderer() method, you must return a reference to it.
Expand Down
2 changes: 1 addition & 1 deletion api/cpp/include/slint_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct Image
///
/// Safety:
///
/// This function is unsafe because invalid texture ids may lead to undefind behavior in OpenGL
/// This function is unsafe because invalid texture ids may lead to undefined behavior in OpenGL
/// drivers. A valid texture id is one that was created by the same OpenGL context that is
/// current during any of the invocations of the callback set on
/// [`Window::set_rendering_notifier()`]. OpenGL contexts between instances of [`slint::Window`]
Expand Down
2 changes: 1 addition & 1 deletion api/cpp/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ mod allocator {
if align <= core::mem::size_of::<usize>() {
malloc(layout.size()) as *mut u8
} else {
// Ideally we'd use alligned_alloc, but that function caused heap corruption with esp-idf
// Ideally we'd use aligned_alloc, but that function caused heap corruption with esp-idf
let ptr = malloc(layout.size() + align) as *mut u8;
let shift = align - (ptr as usize % align);
let ptr = ptr.add(shift);
Expand Down
2 changes: 1 addition & 1 deletion api/cpp/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ struct CppPlatform {
window_factory: unsafe extern "C" fn(PlatformUserData, *mut WindowAdapterRcOpaque),
#[cfg(not(feature = "std"))]
duration_since_start: unsafe extern "C" fn(PlatformUserData) -> u64,
// silent the warning depite `Clipboard` is a `#[non_exhaustive]` enum from another crate.
// silent the warning despite `Clipboard` is a `#[non_exhaustive]` enum from another crate.
#[allow(improper_ctypes_definitions)]
set_clipboard_text: unsafe extern "C" fn(PlatformUserData, &SharedString, Clipboard),
#[allow(improper_ctypes_definitions)]
Expand Down
4 changes: 2 additions & 2 deletions api/rs/build/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ impl<Sink: Write> Write for CodeFormatter<Sink> {
fn formatter_test() {
fn format_code(code: &str) -> String {
let mut res = Vec::new();
let mut formater = CodeFormatter::new(&mut res);
formater.write_all(code.as_bytes()).unwrap();
let mut formatter = CodeFormatter::new(&mut res);
formatter.write_all(code.as_bytes()).unwrap();
String::from_utf8(res).unwrap()
}

Expand Down
36 changes: 32 additions & 4 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"uninit",
"unmap",
"unsync",
"vsync",
"winit"
"vsync"
],
"ignoreRegExpList": [
"/#\\[cfg\\b.+\\]/",
Expand All @@ -61,60 +60,89 @@
}
],
"words": [
"aarch",
"accesskit",
"antialiasing",
"armv",
"Bezier",
"cbindgen",
"cmake",
"colspan",
"combobox",
"datastructures",
"dealloc",
"flickable",
"focusable", // common term in UI (css, dom, toolkits)
"fullscreen",
"gles",
"Goffart",
"gradians",
"grayscale",
"groupbox",
"Hausmann",
"Helvetica",
"inout",
"layouting", // This would be worth renaming in the ItemVTable to layout_info
"linebreak",
"lineedit",
"listview",
"lvalue",
"microcontroller",
"microcontrollers",
"MSVC",
"napi",
"ogoffart",
"opengl",
"opengles",
"pixmap",
"riscv",
"rowspan",
"rustc",
"rvalue",
"scrollview",
"SDK",
"sixtyfps",
"skia",
"slint",
"slintpad",
"SPDX",
"spdx",
"spinbox",
"streetsidesoftware",
"struct",
"structs",
"tableview",
"tabwidget",
"testcase",
"textedit",
"tmpobj",
"toolchain",
"toolkit",
"touchpad",
"tronical",
"typeloader",
"uefi",
"uncompiled",
"unerase",
"unmapping", // present participle of unmap
"untracked",
"viewbox",
"vtable",
"vulkan",
"wasm",
"webassembly",
"windowrc", // use in slint_windowrc_foo FFI functions
"xtask"
"winit",
"xtask",
"xtensa"
],
"ignorePaths": [
"api/cpp/docs/conf.py",
"Cargo.toml",
"CHANGELOG.md",
"cspell.json",
"LICENSES",
"examples/*/lang/**",
"internal/backends/qt/QtThirdPartySoftware_Listing.txt",
".github/workflows/*.yaml"
],
"ignoreRegExpList": [
Expand Down
5 changes: 3 additions & 2 deletions docs/reference/src/language/widgets/standardtableview.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->

## `StandardTableView`

The `StandardTableView` represents a table of data with columns and rows. Cells
are organised in a model where each row is a model of
are organized in a model where each row is a model of
\[[`StandardListViewItem`](../builtins/structs.md#standardlistviewitem)\].

### Properties
Expand All @@ -23,7 +24,7 @@ Same as [`ListView`](#listview), and in addition:

### Functions

- **`set-current-row(int)`: Sets the current row by index and brings it into view.
- **`set-current-row(int)`**: Sets the current row by index and brings it into view.

### Example

Expand Down
3 changes: 2 additions & 1 deletion docs/reference/src/language/widgets/switch.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->

## `Switch`

A `Switch` is a representation of a physical switch that allows users to turn things on or off. Consider using a `CheckBox` instead if you want the user to select or deselect values, for example in a list with multiple options.
Expand All @@ -7,7 +8,7 @@ A `Switch` is a representation of a physical switch that allows users to turn th

- **`checked`**: (_inout_ _bool_): Whether the switch is checked or not (default: false).
- **`enabled`**: (_in_ _bool_): Defaults to true. When false, the switch can't be pressed (default: true).
- **`has-focus`**: (_out_ _bool_): Set to true when the switch has keyboard focue (default: false).
- **`has-focus`**: (_out_ _bool_): Set to true when the switch has keyboard focus (default: false).
- **`text`** (_in_ _string_): The text written next to the switch.

### Callbacks
Expand Down
5 changes: 3 additions & 2 deletions docs/triage.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->

## Introduction

This document will outline the process of triaging GitHub issues and provide an explanation of GitHub labels.

## GitHub Labels

Labels that start with `a:` are area labels.
Area labels help categorise issues based on their scope. Each issue should ideally have at least one area label.
Area labels help categorize issues based on their scope. Each issue should ideally have at least one area label.
The description of the area label ends with a code that indicates the maintainer or backup maintainer of that area.
For example, if a label description ends with `(mX,bY)`, it means person X is the maintainer, and person Y is the backup maintainer for that area.

Expand Down Expand Up @@ -57,7 +58,7 @@ Filter for all the issues not assigned to an area:
curl -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/slint-ui/slint/labels?per_page=100&page=1" | jq -r '.[].name' | grep "^a:" | sed 's/^\(.*\)$/-label:\\\"\1\\\"/' | xargs echo
```

Filter of all issues for which X is a maintainer (replace the X in `"mX"` with the right letter name, or `bX` for the backup)
Filter of all issues for which X is a maintainer (replace the X in `"mX"` with the right letter name, or `bX` for the backup)

```sh
curl -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/slint-ui/slint/labels?per_page=100&page=1" | jq -r '.[] | select(.description | contains("mX")) | .name' | awk '{printf "\"%s\",", $0}' | sed 's/^\(.*\),$/label:\1\n/'
Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// This file is the entry point for the vscode extension (not the browser one)

// cSpell: ignore aarch armv codespaces gnueabihf vsix
// cSpell: ignore codespaces gnueabihf vsix

import * as path from "path";
import { existsSync } from "fs";
Expand Down
4 changes: 1 addition & 3 deletions editors/vscode/src/wasm_preview.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial

// cSpell: ignore winit

import { Uri, TextDocumentShowOptions } from "vscode";
import * as vscode from "vscode";
import { BaseLanguageClient } from "vscode-languageclient";
Expand Down Expand Up @@ -245,7 +243,7 @@ function getPreviewHtml(slint_wasm_preview_url: Uri): string {
try {
slint.run_event_loop();
} catch (e) {
// ignore winit event loop exception
// ignore event loop exception
}
current_instance = (async () => {
let new_instance = await component.create("slint_canvas");
Expand Down
2 changes: 1 addition & 1 deletion examples/7guis/tempconv.slint
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ component TempConv inherits Window {
}
}
Text {
text: Celcius = ";
text: Celsius = ";
vertical-alignment: center;
}
f := LineEdit {
Expand Down
2 changes: 1 addition & 1 deletion examples/bash/laptop.svg.license
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Goole Noto Font <https://github.com/googlefonts/noto-emoji>
SPDX-FileCopyrightText: 2021 Google Noto Font <https://github.com/googlefonts/noto-emoji>

SPDX-License-Identifier: OFL-1.1
6 changes: 3 additions & 3 deletions examples/energy-monitor/ui/blocks/kiosk_overlay.slint
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export component KioskOverlay {
i-text := Text {
x: parent.width - self.width - 5px;
y: 5px;
font-size: Theme.typo.desciption.size;
font-weight: Theme.typo.desciption.weight;
font-size: Theme.typo.description.size;
font-weight: Theme.typo.description.weight;
text: "Kiosk";
color: Theme.palette.limon-green;
color: Theme.palette.lemon-green;
opacity: 0.5;
}
}
Loading

0 comments on commit b12575a

Please sign in to comment.