Closed stdedos closed 1 month ago
@isaak654 https://github.com/sandboxie-plus/sandboxie-docs/issues/111#issuecomment-2031919158
Here is my proposal. I hope upstream (i.e., you, in plural) is okay with installing the https://pre-commit.ci/ app. There are other ways also, but less powerful.
Please familiarize yourself with the (short) website/demo/docs https://pre-commit.ci/.
It may be possible to see the results of my MR, after you install the pre-commit.ci in the repository, on this same MR.
Here is my proposal. I hope upstream (i.e., you, in plural) is okay with installing the https://pre-commit.ci/ app.
There are doubts in this regard:
xanatosdavid well it says free for open source repositories so i guess we can install it for free xanatosdavid hmm... it says 0โฌ but still wants billing informations xanatosdavid woukd that tool help so much?
If you agree to include an email address in your GitHub profile, I can invite you on Slack to discuss with the repository owner.
@isaak654 I have tried reaching you in private on Discord
Action would've worked correctly "locally" (on the fork), but I have created a workflow issue (https://github.com/stdedos/sandboxie-docs/actions/runs/10206030628/job/28238064040#step:5:18), and would've worked for this repo, but GH does not allow "privilege escalation" (https://github.com/sandboxie-plus/sandboxie-docs/actions/runs/10206030965/job/28238065287?pr=165#step:1:17 vs https://github.com/stdedos/sandboxie-docs/actions/runs/10206030628/job/28238064040#step:1:17)
The "push from the PR" needs to be improved.
... but, if we switched
push:
branches:
- main
pull_request:
branches:
- main
to
push:
pull_request:
branches:
- main
then, every push (including forks!) would fix this for us, like what has happened here ^^
(or altogether to
push:
pull_request:
I don't see "why not" enforce those basic rules to everything ๐)
@QZLin Will we have a secondary branch with the merging of #167?
@QZLin Will we have a secondary branch with the merging of #167?
If you mean the gh-pages branch, yes. publish.yml will call mkdocs gh-deploy
, and mkdocs will create a gh-pages branch and push the built site into it.
@isaak654 I saw
The last option is fine with me, as we don't keep any old branch here.
So, are we good with this? Should I make my proposed changes?
That comment did not consider #167, let's proceed with:
push:
pull_request:
branches:
- main
There's always branches-ignore
: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-excluding-branches`
There's always
branches-ignore
: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-excluding-branches`
I didn't know, it's OK.
I dropped schedule.cron
and workflow_dispatch
from the latest change; I haven't seen a need for these to exist yet
I would still apply
- id: mixed-line-ending
args:
- --fix=lf
This PR will bring "a lot of changes" - might as well bring the changes we want
Also statements like
exclude: '^(Media/.*)'
are useless. Idk if you have any counter-examples, but at this state - they don't do anything for this repository.
Let's "fix them" when we have actual examples?
I would prefer the first three commits to be squashed into one and the fourth discarded so as not to interfere with the other pull request being processed.
- Removing trailing whitespace (trailing-whitespace).
https://markdown-guide.readthedocs.io/en/latest/basics.html#line-return
Enabling the trailing-whitespace
setting may cause formatting issues with sections of the documents that use two trailing spaces for line breaks. Therefore, we should either avoid using this setting or update the relevant sections of the documents with alternative solutions.
I would prefer the first three commits to be squashed into one and the fourth discarded so as not to interfere with the other pull request being processed.
.. as soon as you push something, anywhere - the pre-commit will fix it.
This is a merge-with-merge-commit kind of Pull Request ๐
I have no opinion about the other commits - everything goes. But, even if we try to go against the CI, it will be only a temporary measure.
- Removing trailing whitespace (trailing-whitespace).
markdown-guide.readthedocs.io/en/latest/basics.html
Enabling the
trailing-whitespace
setting may cause formatting issues with sections of the documents that use two trailing spaces for line breaks. Therefore, we should either avoid using this setting or update the relevant sections of the documents with alternative solutions.
I don't know where are you finding this, because https://github.com/pydanny/markdown-guide/blob/master/docs/index.rst does not exist anymore.
I would say that trailing newlines for a forced newline is a "somewhat poor" pattern nowadays. (: I haven't tried to gather evidence against it. Enough of editors that I see / have used support trimming trailing whitespace nowadays)
Conforming to (Github) CM is a much better option IMHO.
For the specific example you are showing, why not use an unordered list instead?
.. as soon as you push something, anywhere - the pre-commit will fix it.
This is a merge-with-merge-commit kind of request ๐
I have no opinion about the other commits - everything goes. But, even if we try to go against the CI, it will be only a temporary measure.
All right, so let's squash the first three commits into one.
What about
Which files will change after the modification?
Ok.
What about
Which files will change after the modification?
A. Lot.
Markdown files should be LF by default, so I have no objection.
I've just decided to merge the other pull request before this one, so be prepared for a possible file conflict to be solved here.
As you wish. ... but that's sad.
This is ready already, and we still have the https://github.com/sandboxie-plus/sandboxie-docs/pull/165#issuecomment-2267461976 argument in the air ๐
With a small addition in the commit message, I have skipped the pre-commit CI and fixed the conflicts altogether.
... fixed the conflicts altogether.
I am not sure how you did that. You are still on top of https://github.com/sandboxie-plus/sandboxie-docs/commit/178a7f49bce4c94ab30e6750477115fe1a8d2526 (https://github.com/sandboxie-plus/sandboxie-docs/commit/8e2f75a12aefa421c462ebd2bc757147ed681f89)
I am not sure how you did that. You are still on top of 178a7f4 (8e2f75a)
Before amending the initial commit, I've used git reset HEAD~1
to undo the auto-fixes commit.
About @offhub's report, I think we should check all .md files in 487f678 in order to find all lines with two trailing spaces.
FAQVirus.md (lines 47-49) has the same regression of InjectDll.md (lines 21-26), so any help to reduce the effort in manually examining the files would be useful, including any script or command that could help us list the files to fix.
I am not sure how you did that. You are still on top of 178a7f4 (8e2f75a)
Before amending the initial commit, I've used
git reset HEAD~1
to undo the auto-fixes commit.About @offhub's report, I think we should check all .md files in 487f678 in order to find all lines with two trailing spaces.
FAQVirus.md (lines 47-49) has the same regression of InjectDll.md (lines 21-26), so any help to reduce the effort in manually examining the files would be useful, including any script or command that could help us list the files to fix.
Idk why this needs to be more complicated than it needs to be ๐
$ ug -C2 ' $'
docs/Content/ApplicationsSettings.md
51- [Sandboxie Control](SandboxieControl.md) > [Sandbox Settings](SandboxSettings.md) > Applications > Email Reader
52-
53: ![](../Media/EmailReaderSettings.png)
54-
55- This settings page offers quick configuration for the following email programs:
docs/Content/DeleteSandbox.md
1- # Delete Sandbox
2-
3: [Sandboxie Control](SandboxieControl.md) > [Sandbox Menu](SandboxMenu.md) > Delete Contents
4- [Sandboxie Control](SandboxieControl.md) > [Tray Icon Menu](TrayIconMenu.md) > Delete Contents
5-
docs/Content/FAQVirus.md
45- ### Q. Will viruses remain in the sandbox after I close all programs in the sandbox?
46-
47: A. Yes and no:
48: 1\. No, if your sandbox is set to [automatically](DeleteSettings.md#invocation) delete;
49: 2\. Yes, in the configuration, but only until you [manually](DeleteSandbox.md) delete the contents of the sandbox.
50- It is important to note that a virus file in the sandbox is just that -- _a file_, not much different from your average text file. Unless you move the file out of the sandbox and invoke it, there
51-
--
56- ### Q. Why does my anti-virus detect a virus in the _System Volume Information_ folder?
57-
58: A. The System Restore component in Windows collects various files into the _System Volume Information_ when they are deleted. While the intention is to protect your system, sometimes System Resto
59- Note that this will not occur if you securely wipe the contents of the sandbox (see previous question).
60-
docs/Content/ForceProcess.md
15- ForceProcess=outlook.exe
16- ForceProcess=cl?cke?.exe
17:
18- ```
19-
docs/Content/InjectDll.md
19- The order of DLLs loaded into the sandboxed program is thus:
20-
21: Ntdll.dll
22: KernelBase.dll (only on Windows 7)
23: Kernel32.dll
24: SbieDll.dll (on 64-bit Windows, this can be either the 64-bit SbieDll or the 32-bit SbieDll)
25: _InjectDlls_ (loaded in the order specified in Sandboxie.ini)
26: Optionally, ShimEng (or AppHelp on Windows 7) and related DLLs
27- All [statically-linked](https://msdn.microsoft.com/en-us/library/ms684184(VS.85).aspx) DLLs
28-
docs/Content/OpenProtectedStorage.md
12- Indicates that programs running in the DefaultBox sandbox will update the global system [Protected Storage](ProtectedStorage.md), rather than a sandboxed instance of it.
13-
14: Related [Sandboxie Control](SandboxieControl.md) setting: _Save outside sandbox: History of search strings and invoked commands_
15- in [Sandbox Settings > Applications > Web Browser](ApplicationsSettings.md#web-browser)
docs/Content/ProtectHostImages.md
1- # Protect Host Images
2-
3: _ProtectHostImages_ is a sandbox setting in [Sandboxie Ini](SandboxieIni.md) available since v1.9.0 / 5.64.0. This setting can be enabled to prevent processes located outside the sandbox from loa
4-
5- ```
docs/Content/QuickRecovery.md
1- # Quick Recovery
2-
3: [Sandboxie Control](SandboxieControl.md) > [Sandbox Menu](SandboxMenu.md) > Quick Recovery
4- [Sandboxie Control](SandboxieControl.md) > [Tray Icon Menu](TrayIconMenu.md) > Quick Recovery
5-
docs/Content/ResourceAccessSettings.md
11- Examples where exceptions are convenient or necessary:
12-
13: * Allow direct access to some specific folder. For example, let the Web browser place downloads directly in a _Downloads_ folder.
14- See the [File Access](ResourceAccessSettings.md#file-access) category below.
15- * A program may need access to some resource for correct operation. If the program is known and trusted, it is reasonable to make such an exception. See [Known Conflicts](KnownConflicts.md) for
docs/Content/SandboxMenu.md
14-
15-
16: * The _Web Browser_ command starts the system (default) Web browser.
17- (Note: If the wrong program starts, see [Frequently Asked Questions](FrequentlyAskedQuestions.md#why-does-the-wrong-program-start-when-i-run-my-default-web-browser-sandboxed) to fix this.)
18-
--
62- The special variable **%SANDBOX%** is replaced by the name of the sandbox.
63-
64: The special variable **%USER%** is replaced by the name of whichever user account (or logon) is using that sandbox. Note that a sandbox created in one user account is visible and can be used by o
65- However, if the container folder includes the **%USER%** special variable, then the user accounts don't actually share the same sandbox. Each account has a separate instance of the sandbox.
66-
docs/Content/TestEmailConfiguration.md
7- After completing the email configuration, you may want to test it to make sure that new emails will not be lost when you delete the sandbox. To do that, follow these steps:
8-
9: * Disable Internet access in the sandbox. This is a precaution measure, to make sure that your sandboxed email program cannot retrieve new mail messages before you confirm the configuration is
10- Open [Sandbox Settings > Restrictions > Internet Access](RestrictionsSettings.md#internet-access), then click _Block All Programs_, and finally click _OK_.
11-
--
25- If the email message that you created in a sandboxed instance of your email program is also accessible in the normal (unsandboxed) instance, even after the sandbox has been deleted, then the conf
26-
27: * When done, re-enable Internet access in the sandbox:
28- Open [Sandbox Settings > Restrictions > Internet Access](RestrictionsSettings.md#internet-access), then click _Remove_ (to remove the restriction), and finally click _OK_.
29-
docs/Content/TrayIconMenu.md
17- One or more sub-menus appear for each sandbox defined. The default configuration includes only one sandbox named _DefaultBox_, but more can be added using the [Sandbox Menu](SandboxMenu.md). Each
18-
19: * The _Run Web Browser_ command starts the system (default) Web browser.
20: Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Run Sandboxed -> Web Browser.
21- (Note: If the wrong program starts, see [Frequently Asked Questions](FrequentlyAskedQuestions.md#why-does-the-wrong-program-start-when-i-run-my-default-web-browser-sandboxed) to fix this.)
22-
23: * The _Run Email Reader_ command starts the system (default) email reader.
24- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Run Sandboxed -> Email Reader.
25-
26: * The _Run Any Program_ command displays the Run Any Program dialog box which is similar to the standard Windows _Run..._ dialog box. It can be used to start programs, open documents, and brows
27- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Run Sandboxed -> Any Program.
28-
29: * The _Run From Start Menu_ command displays the Sandboxie Start menu, similar to the standard Windows Start menu. It can be used to start programs and other shortcuts that appear in the start
30- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Run Sandboxed -> From Start Menu.
31-
32: * The _Run Windows Explorer_ command starts a sandboxed instance of the Windows Explorer. It can be used to navigate folders and start programs, all under the supervision of Sandboxie.
33- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Run Sandboxed -> Windows Explorer.
34-
35: * The _Terminate Programs_ command stops all programs running in the sandbox.
36- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Terminate Running Programs.
37-
38: * The _Quick Recovery_ command shows the [Quick Recovery](QuickRecovery.md) window.
39- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Quick Recovery.
40-
41: * The _Delete Contents_ command shows the [Delete Sandbox](DeleteSandbox.md) window.
42- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Delete Contents.
43-
44: * The _Explore Contents_ command opens an _unsandboxed_ folder view for the contents of the sandbox _outside the supervision of Sandboxie_. If possible, use the [Files And Folders View](FilesAn
45- Same as [Sandbox Menu](SandboxMenu.md) -> _(sandbox)_ -> Explore Contents.
46-
--
49- ### Terminate All Programs
50-
51: The _Terminate All Programs_ command stops all programs running in all sandboxes.
52- Same as [File Menu](FileMenu.md) -> Terminate All Programs.
53-
--
58- ### Disable Forced Programs
59-
60: The _Disable Forced Programs_ toggle command temporarily disables and re-enables forced sandboxing. See the associated command in the [File Menu](FileMenu.md). Note that unlike the File Menu comm
61- Same as [File Menu](FileMenu.md) -> Disable Forced Programs.
62-
--
67- ### Run As UAC Administrator
68-
69: The _Run As UAC Administrator_ (not shown in the picture; see [File Menu](FileMenu.md)) toggle command tells Sandboxie to ask for elevation to Administrative privileges before starting any progra
70- Same as [File Menu](FileMenu.md) -> Run As UAC Administrator.
71-
--
76- ### Exit
77-
78: The _Exit_ command quits [Sandboxie Control](SandboxieControl.md). Note that merely closing the window (or selecting the _Hide Window_ command) _does not_ quit Sandboxie Control.
79- Same as [File Menu](FileMenu.md) -> Exit.
80-
We just need to fix the files "accordingly" (I guess this is for you @isaak654, being the docs gatekeeper), and then verify that the style is the same (or similar).
The latter can fall again on you, or, if you decided to host documentation e.g. to ReadTheDocs - you could use https://docs.readthedocs.io/en/stable/pull-requests.html?
See https://github.com/sandboxie-plus/sandboxie-docs/compare/fixes for the ongoing fixes.
ug -C2 ' $'
in the Content
folder there
_I have left on purpose a few trailing whitespaces to test the pre-commit bot afterwards._Other things you might need to check:
ug -C2 ' $'
in the PlusContent
folder?See
fixes
(compare) for the ongoing fixes.
- Please rerun
ug -C2 ' $'
in theContent
folder there _I have left on purpose a few trailing whitespaces to test the pre-commit bot afterwards._
ug
is "just a fancy grep
". ofc I have no problem checking it from my side, but you can verify it yourself either via grep
- or from pre-commit
itself.
(Indeed you left only two files with two trailing whitespaces, but there are some more with one trailing whitespace)
Other things you might need to check:
- Fix the conflicting file in this PR
Done โ
- Did you previously run
ug -C2 ' $'
in thePlusContent
folder?
Especially in this case, I run commands from the top-level - as pre-commit does ๐
... but I guess anyway I needed to wait for https://github.com/sandboxie-plus/sandboxie-docs/compare/fixes to be merged before rebasing this one :/
New commit reference in sandboxie-plus:main
: bce1b27
[pre-commit.ci] reference in sandboxie-plus:main
: 7145afc
Create initial
pre-commit
configurationThe commit introduces a basic
pre-commit
configuration with hooks for auto-fixing common code quality issues:end-of-file-fixer
),mixed-line-ending
), andtrailing-whitespace
).Use a home-brewed pre-commit CI action, because the organization cannot install the necessary pre-commit GitHub application.
Draw inspiration from:
Signed-off-by: Stavros Ntentos 133706+stdedos@users.noreply.github.com