Skip to content

Commit

Permalink
Create initial pre-commit configuration
Browse files Browse the repository at this point in the history
The commit introduces a basic `pre-commit` configuration
with hooks for auto-fixing common code quality issues:

* Ensure files end with a newline (`end-of-file-fixer`),
* Standardizing line endings to LF (`mixed-line-ending`), and
* Removing trailing whitespace (`trailing-whitespace`).

Use a home-brewed pre-commit CI action, because the organization
cannot install the necessary pre-commit GitHub application.

Draw inspiration from:
* https://github.com/isaak654/sandboxie-docs/blob/6169c206fa9978641dafddf34303404604beaf33/.pre-commit-config.yaml
* https://github.com/isaak654/sandboxie-docs/blob/84751989d8fdee890520f116ea9e2ab0ff9f9b53/.github/workflows/action.yml#L59-L87

Signed-off-by: Stavros Ntentos <[email protected]>


skip-checks: true
  • Loading branch information
stdedos authored and isaak654 committed Sep 15, 2024
1 parent 824b4a7 commit 430c444
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 33 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: pre-commit

on:
# Triggers the workflow on ALL push or pull request events
# except for the `gh-pages`` branch
push:
branches-ignore:
- gh-pages
pull_request:
branches-ignore:
- gh-pages

permissions:
contents: write

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x

- uses: pre-commit/[email protected]

- name: Commit changes
if: ${{ !cancelled() && failure() }}
shell: bash
run: |
git config --local user.name "pre-commit-ci[bot]"
git config --local user.email "66853113+pre-commit-ci[bot]@users.noreply.github.com"
git commit -m "[pre-commit.ci] auto-fixes from pre-commit hooks" -a
git push origin HEAD:${{ github.head_ref || github.ref_name }}
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ jobs:
- uses: actions/[email protected]
with:
path: './site'

18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ci:
autofix_commit_msg: '[pre-commit.ci] auto-fixes from pre-commit hooks'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
args:
- --maxkb=10000
- id: check-merge-conflict
- id: mixed-line-ending
args:
- --fix=lf
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: trailing-whitespace
36 changes: 6 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
# Sandboxie documentation

[![Markdown links Status](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/action.yml/badge.svg)](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/action.yml) [![Codespell Status](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/codespell.yml/badge.svg)](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/codespell.yml)

[![Join our Discord Server](https://img.shields.io/badge/Join-Our%20Discord%20Server%20for%20bugs,%20feedback%20and%20more!-blue?style=for-the-badge&logo=discord)](https://discord.gg/S4tFu6Enne)
[![Markdown links Status](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/action.yml/badge.svg)](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/action.yml) [![Codespell Status](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/codespell.yml/badge.svg)](https://github.com/sandboxie-plus/sandboxie-docs/actions/workflows/codespell.yml) [![Join our Discord Server](https://img.shields.io/badge/Join-Our%20Discord%20Server%20for%20bugs,%20feedback%20and%20more!-blue?style=flat&logo=discord)](https://discord.gg/S4tFu6Enne)

## Introduction
Sandboxie is a sandbox-based isolation software for Windows that lets you try and run untrusted applications without worrying about unwanted changes to your files or registry.

After Sandboxie became [open source](https://news.sophos.com/en-us/2020/04/09/sandboxie-is-now-an-open-source-tool/), it was decided to release the documentation in the same way, in order to be accessible and easily updated from the community than the documentation available on [sandboxie-plus.com](https://sandboxie-plus.com) and other archived sources.

A GitHub Pages site based on this content is also available: [https://sandboxie-plus.github.io/sandboxie-docs](https://sandboxie-plus.github.io/sandboxie-docs)
<br>If you would like to improve it, please see [#102](https://github.com/sandboxie-plus/sandboxie-docs/issues/102)

## Help Topics
Sandboxie is a sandbox-based isolation software for Windows that lets you try and run untrusted applications without worrying about unwanted changes to your files or registry.

* [Getting Started with Sandboxie](docs/Content/GettingStarted.md)
* [General Usage Tips](docs/Content/UsageTips.md)
* [Usage Manual for Sandboxie Control](docs/Content/SandboxieControl.md)
* [Known Conflicts](docs/Content/KnownConflicts.md)
* [Frequently Asked Questions](docs/Content/FrequentlyAskedQuestions.md)
* [Advanced Topics](docs/Content/AdvancedTopics.md)
* [Technical Aspects](docs/Content/TechnicalAspects.md)
* [SBIE Messages](docs/Content/SBIEMessages.md)
* [Command Line Usage](docs/Content/StartCommandLine.md)
* [Sandboxie Configuration File](docs/Content/SandboxieIni.md)
* [Resource Access Settings](docs/Content/ResourceAccess.md)
* [Sandboxie Plus Migration Guide](docs/Content/PlusMigrationGuide.md)
* [Sandboxie Plus Features](docs/PlusContent/Plus-Features.md)
* [All Pages Index](docs/Content/AllPages.md)
After Sandboxie became [open source](https://news.sophos.com/en-us/2020/04/09/sandboxie-is-now-an-open-source-tool/), it was decided to release the documentation, so that it would be accessible and easily updated by the community, as opposed to the dated documentation available at [sandboxie-plus.com](https://sandboxie-plus.com) and other archived sources.

## Get Sandboxie
Select from two editions:

* Get Sandboxie Plus if you are a first-time user or want the latest features.
* Get Sandboxie Classic if you have used Sandboxie for a long time.

[Feature Comparison](docs/Content/FeatureComparison.md) | [System requirements](https://github.com/sandboxie-plus/Sandboxie#sandboxie) | [Changelog](https://github.com/sandboxie-plus/Sandboxie/blob/master/CHANGELOG.md) | [Download the latest release](https://github.com/sandboxie-plus/Sandboxie/releases/latest)
[Feature/Edition comparison](docs/Content/FeatureComparison.md) | [System requirements](https://github.com/sandboxie-plus/Sandboxie#sandboxie-plus--classic) | [Download the latest release](https://github.com/sandboxie-plus/Sandboxie/releases/latest)

## Contribute
If you have development, testing or translation skills, then feel free to check out our [Contribution guidelines](https://github.com/sandboxie-plus/Sandboxie/blob/master/CONTRIBUTING.md).

If you have development, testing or translation skills, then feel free to check out our [Contribution guidelines](https://github.com/sandboxie-plus/Sandboxie/blob/master/CONTRIBUTING.md).
4 changes: 2 additions & 2 deletions custom_theme/nav.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a class="{% if not nav_item.is_link %}reference internal{% endif %}{% if nav_item.active%} current{%endif%}"
<a class="{% if not nav_item.is_link %}reference internal{% endif %}{% if nav_item.active%} current{%endif%}"
{% if nav_item == page %}href="#"{% elif nav_item.is_page or nav_item.is_link %} href="{{ nav_item.url|url }}"{% endif %}
{% if nav_item.is_section %}onclick="this.children[0].click()"{% endif %}>
{{ nav_item.title }}</a>
Expand All @@ -22,4 +22,4 @@
{%- endif %}
</ul>
{%- endif %}
{%- set navlevel = navlevel - 1 %}
{%- set navlevel = navlevel - 1 %}

0 comments on commit 430c444

Please sign in to comment.