Commit graph

5 commits

Author SHA1 Message Date
Markus Heiser
67e423edb2 [enh] CI - add shell script formatter
Implement rules and functions to format shell scripts:

    $ make format.shell

or alternatively to format all source code:

    $ make format

The formatter `shfmt` reads the rules from the editorconfig[1]

  If any EditorConfig files are found, they will be used to apply formatting
  options.  If any parser or printer flags are given to the tool, no
  EditorConfig files will be used.

[1] https://github.com/patrickvane/shfmt?tab=readme-ov-file#description

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-07-28 12:53:26 +02:00
Markus Heiser
d0bb977c48
[fix] .editorconfig: correction of the settings from the realities (#4892)
Some checks failed
Documentation / Release (push) Has been cancelled
Integration / Python 3.10 (push) Has been cancelled
Integration / Python 3.11 (push) Has been cancelled
Integration / Python 3.12 (push) Has been cancelled
Integration / Python 3.13 (push) Has been cancelled
Integration / Python 3.9 (push) Has been cancelled
Integration / Theme (push) Has been cancelled
The code formatter allows up to 120 characters per line, but for better
readability the editor should prefer 80 characters per line

In the HTML templates (jinja) we usually use an indentation of two and no tabs.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-06-09 07:19:50 +02:00
Markus Heiser
b6487b70aa [web-client] simple theme: build & development env based on vite.
Vite is a build tool, it consists of two major parts [1]:

- A dev server that provides rich feature enhancements over native ES modules,
  for example extremely fast Hot Module Replacement (HMR).

- A build command that bundles your code with Rollup, pre-configured to output
  highly optimized static assets for production.

[1] https://vite.dev/guide/

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Yaksh Bariya
8bf2da9ce5 [enh] add editorconfig rules for javascript files
SearXNG has a bunch of javascript files which have an indentation of
two, but the '*' rule tells my editor to use 4 spaces.
2024-04-08 09:07:45 +02:00
Markus Heiser
60808fd3bd [enh] add .editorconfig
EditorConfig [1] helps maintain consistent coding styles for multiple developers
working on the same project across various editors and IDEs.

The EditorConfig specification [2] support is pre installed in common IDEs [3]
and plugins for many others are available [4].

[1] https://editorconfig.org
[2] https://editorconfig-specification.readthedocs.io/
[3] https://editorconfig.org/#pre-installed
[4] https://editorconfig.org/#download

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-20 12:29:12 +01:00