From d2e034defe0739f713cdb49bbd62dfc98b1e9236 Mon Sep 17 00:00:00 2001
From: "Mat. B" <5618628+MPX4132@users.noreply.github.com>
Date: Sat, 25 Apr 2020 22:26:02 -0500
Subject: [PATCH] Minor tweaks to the rules.
---
Code-style-guide.md | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/Code-style-guide.md b/Code-style-guide.md
index 6797e03..1c248ab 100644
--- a/Code-style-guide.md
+++ b/Code-style-guide.md
@@ -1,10 +1,11 @@
These are the code style guidelines that should be followed when contributing to fluxion.
## Indentation
-_Indent = two tabs
-
-
-Not hard tabs. Not four spaces. Not however many spaces you feel like. **2 tabs.**
+Due to the fact the tab length may vary between systems and users, use **two spaces** instead of real tabs.
+* No hard tabs (\t)
+* Not four spaces
+* Not however many spaces you feel like
+* **Two spaces** ( )
## Line Length
Be reasonable. Keeping within 80 characters is recommended, 120 is the **maximum**.
@@ -21,19 +22,17 @@ This function is prefixed with "fluxion" to signify it belongs to the fluxion sc
## Variables
* Limit the scope of variables to local if within a function.
-* Wrap your variables in ${curly} ${braces} for clarity.
* Use existing variables whenever possible to avoid pollution.
* Identify variables using **camel-case**.
* Prefix identifiers with the **capitalized** script name defining them.
-For example, the global "FluxionLanguage"
+For example, the global "CaptivePortalHashPath"
-This global is prefixed with "Fluxion" to signify it belongs to the fluxion script. Using camel-case makes it clear it's not a subroutine.
+This global is prefixed with "CaptivePortal" to signify it belongs to the captive portal attack script. Using camel-case makes it clear it's not a subroutine, which use **snake-case**.
## Constants
* Limit the scope of constants to local if within a function.
-* Wrap your constants in ${curly} ${braces} for clarity.
* Use existing constants whenever possible to avoid pollution.
* Identify constants using **camel-case**.
* Prefix identifiers with the **uppercased** script name defining them.
@@ -54,6 +53,9 @@ $(whoami)
```
${USER}
${PWD}
+
+$USER
+$PWD
```
## Flow Logic
@@ -81,7 +83,7 @@ foo() {
print 'bar'
}
```
-NOTE: There are some exceptions but in general use POSIX.
+NOTE: There are some exceptions but in general use POSIX standards.
## Misc
Do NOT use backticks (\`command\`) to execute something in a subshell.