Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ jobs:
- name: PHP lint
run: Build/Scripts/lint-php.sh

typos-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install typos
run: pipx install typos

- name: Typos lint
run: Build/Scripts/lint-typos.sh

typoscript-linting:
runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 24 additions & 0 deletions Build/Scripts/lint-typos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# Checks the spelling of all files of the extension with typos, using
# Build/typos.toml. Files ignored by .gitignore are skipped.
#
# typos is not installed via composer. It is provided by shell.nix, in CI it
# is installed via pipx.
#
# Usage:
# Build/Scripts/lint-typos.sh report typos
# Build/Scripts/lint-typos.sh --fix fix unambiguous typos in place

source "$(dirname "${BASH_SOURCE[0]}")/common.sh"

if ! command -v typos > /dev/null; then
echo "Missing typos, please install it first, e.g. \"pipx install typos\"." >&2
exit 1
fi

if [ "${1:-}" = "--fix" ]; then
typos --config Build/typos.toml --write-changes
else
typos --config Build/typos.toml
fi
13 changes: 13 additions & 0 deletions Build/typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[files]
extend-exclude = [
# Vendored schemas, kept as published.
"Build/xliff-core-1.2-strict.xsd",
"Build/xml.xsd",
]

[default.extend-identifiers]
# Translation key, renaming it would drop existing translations.
error_occured = "error_occured"
# GiroCheckout API parameters.
shippingAddresseFirstName = "shippingAddresseFirstName"
shippingAddresseLastName = "shippingAddresseLastName"
2 changes: 1 addition & 1 deletion Classes/Controller/Order/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private function updatePaymentAndTransaction($notify, Item $orderItem, string $s
}
}
if (!isset($transaction)) {
throw new Exception('No transation found!', 1731616906);
throw new Exception('No transaction found!', 1731616906);
}

$transaction->setExternalStatusCode($notify->getResponseParam('gcResultPayment'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Description
It is now also possible to configure the credentials in `$GLOBALS['TYPO3_CONF_VARS']` and load there the
passwords from ENV variables.

For more informations go to :ref:`Credentials from $GLOBALS['TYPO3_CONF_VARS'] <credentials-from-confvars>`
For more information go to :ref:`Credentials from $GLOBALS['TYPO3_CONF_VARS'] <credentials-from-confvars>`
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Description

It is possible to configure the configuration from your own loader.

For more informations go to :ref:`Credentials from own CredentialLoader <credentials-from-own-credentialloader>`
For more information go to :ref:`Credentials from own CredentialLoader <credentials-from-own-credentialloader>`
2 changes: 1 addition & 1 deletion Documentation/Introduction/Support/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Support

Slack
-----
There is an own channel at the TYPO3 Slack. Please use this cannel to contact us.
There is an own channel at the TYPO3 Slack. Please use this channel to contact us.

The URL is: https://typo3.slack.com/messages/ext-cart/

Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@
"project:cgl:fix": "Build/Scripts/cgl.sh --fix",
"project:lint": [
"@project:lint:php",
"@project:lint:typos",
"@project:lint:typoscript",
"@project:lint:xml",
"@project:lint:yaml"
],
"project:lint:php": "Build/Scripts/lint-php.sh",
"project:lint:typos": "Build/Scripts/lint-typos.sh",
"project:lint:typos:fix": "Build/Scripts/lint-typos.sh --fix",
"project:lint:typoscript": "Build/Scripts/lint-typoscript.sh",
"project:lint:xml": "Build/Scripts/lint-xml.sh",
"project:lint:yaml": "Build/Scripts/lint-yaml.sh",
Expand Down
29 changes: 29 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,30 @@ let
'';
};

projectLintTypos = pkgs.writeShellApplication {
name = "project-lint-typos";

runtimeInputs = [
pkgs.typos
];

text = ''
"$PROJECT_ROOT/Build/Scripts/lint-typos.sh"
'';
};

projectLintTyposFix = pkgs.writeShellApplication {
name = "project-lint-typos-fix";

runtimeInputs = [
pkgs.typos
];

text = ''
"$PROJECT_ROOT/Build/Scripts/lint-typos.sh" --fix
'';
};

projectLintTypoScript = pkgs.writeShellApplication {
name = "project-lint-typoscript";

Expand Down Expand Up @@ -105,13 +129,15 @@ let

runtimeInputs = [
projectLintPhp
projectLintTypos
projectLintTypoScript
projectLintXml
projectLintYaml
];

text = ''
project-lint-php
project-lint-typos
project-lint-typoscript
project-lint-xml
project-lint-yaml
Expand Down Expand Up @@ -165,6 +191,7 @@ in pkgs.mkShellNoCC {
buildInputs = [
pkgs.cacert
pkgs.libxml2
pkgs.typos
pkgs.yamllint
php
composer
Expand All @@ -173,6 +200,8 @@ in pkgs.mkShellNoCC {
projectCglFix
projectLint
projectLintPhp
projectLintTypos
projectLintTyposFix
projectLintTypoScript
projectLintXml
projectLintYaml
Expand Down
Loading