From 8e63f90f9967f46f1eb62c9d62ff2069c2c56499 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:33:26 -0800 Subject: [PATCH 01/30] Fix litner fuckup --- css/theme-flaredefault-dark.css | 10 +++++----- css/theme-flaredefault-light.css | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index 42b73b2..67676bc 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -10,7 +10,7 @@ body { font-weight: bold; font-size: 150%; border: none; - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } .secondary-nav{ @@ -19,16 +19,16 @@ body { } .ui.table, .ui.segments, .ui.segment, #readme, .ui.dashboard-repos, .ui.vertical.menu, .ui.attached.segment, .ui.top.attached.header, #repo-files-table{ - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } .repository .diff-detail-box{ margin: 0; - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } #diff-file-tree{ - box-shadow: 0 3px 3px rgb(0 0 0 / 20%); + box-shadow: 0 3px 3px rgba(0, 0, 0, 20%); background-color: var(--color-body); z-index: 1000; margin-right: 10px; @@ -39,7 +39,7 @@ body { } .page-footer{ - box-shadow: 0 -2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 -2px 5px rgba(0, 0, 0, 20%); } .ui.tabular.menu .active.item, .ui.tabular.menu .active.item:hover { diff --git a/css/theme-flaredefault-light.css b/css/theme-flaredefault-light.css index 25fc690..96905ed 100644 --- a/css/theme-flaredefault-light.css +++ b/css/theme-flaredefault-light.css @@ -10,7 +10,7 @@ body { font-weight: bold; font-size: 150%; border: none; - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } .secondary-nav{ @@ -19,16 +19,16 @@ body { } .ui.table, .ui.segments, .ui.segment, #readme, .ui.dashboard-repos, .ui.vertical.menu, .ui.attached.segment, .ui.top.attached.header, #repo-files-table{ - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } .repository .diff-detail-box{ margin: 0; - box-shadow: 0 2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 2px 5px rgba(0, 0, 0, 20%); } #diff-file-tree{ - box-shadow: 0 3px 3px rgb(0 0 0 / 20%); + box-shadow: 0 3px 3px rgba(0, 0, 0, 20%); background-color: var(--color-body); z-index: 1000; margin-right: 10px; @@ -40,7 +40,7 @@ body { .page-footer{ background: linear-gradient(#EFEFEF, #DEDEDE); - box-shadow: 0 -2px 5px rgb(0 0 0 / 20%); + box-shadow: 0 -2px 5px rgba(0, 0, 0, 20%); } .ui.tabular.menu .active.item, .ui.tabular.menu .active.item:hover { From 721c3b84c0871d6611576fb121c008201576ea67 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:36:40 -0800 Subject: [PATCH 02/30] Fix linter config --- .stylelintrc.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 96ec509..49d74f3 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,3 +1,6 @@ { - "extends": "stylelint-config-standard" + "extends": "stylelint-config-standard", + "rules":{ + "color-function-notation": "legacy" + } } From f17e406d59855d41b3237770e587e37fa7bfc1da Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:42:45 -0800 Subject: [PATCH 03/30] Update jenkinsfile indentation script --- Jenkinsfile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e219c9..f055cbe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,15 +7,23 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - if grep -P "^[ ]+" -r ./**/*.css; then - echo "Error: Files contain spaces instead of tabs for indentation." + # Define file extensions to check + FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" + + echo "Checking for spaces in indentation..." + grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." + + echo "Checking for mixed indentation..." + grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." + + if grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || \ + grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" .; then + echo "Indentation issues detected. Please fix the above lines." exit 1 + else + echo "No indentation issues detected." + exit 0 fi - if grep -P "^\\t+ +" -r ./**/*.css; then - echo "Error: Files contain mixed tabs and spaces for indentation." - exit 1 - fi - echo "No indentation errors detected." ''' } } From 9e1a7b25057f5199432df455ef290388248b7ca0 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:43:41 -0800 Subject: [PATCH 04/30] Try breaking rules --- .stylelintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 49d74f3..106476f 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,6 +1,6 @@ { "extends": "stylelint-config-standard", "rules":{ - "color-function-notation": "legacy" - } + "color-function-notation": "legacy" + } } From d64a2c86e6fcb0b90b296c859f5e26e1c0d5c38e Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:45:05 -0800 Subject: [PATCH 05/30] Try breaking rules --- .stylelintrc.json | 4 ++-- css/theme-flaredefault-dark.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 106476f..49d74f3 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,6 +1,6 @@ { "extends": "stylelint-config-standard", "rules":{ - "color-function-notation": "legacy" - } + "color-function-notation": "legacy" + } } diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index 67676bc..b062a42 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -1,11 +1,11 @@ @import url("./theme-gitea-dark\.css"); body { - background: #333; + background: #333; } #navbar{ - background: linear-gradient(#df852b, #c4792f); + background: linear-gradient(#df852b, #c4792f); color: black; font-weight: bold; font-size: 150%; From bd3e5d86f1ea0e2570b8764973d540a5f2175373 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:46:24 -0800 Subject: [PATCH 06/30] Fix jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f055cbe..8197ab9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { // Check for spaces or mixed indentation sh ''' # Define file extensions to check - FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" + FILE_EXTENSIONS="css|json|js|java|htm|html|cpp|c|h|p|py|go|cs" echo "Checking for spaces in indentation..." grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." From 6beee92452b21abfd193651b93cd3836d3548429 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:49:06 -0800 Subject: [PATCH 07/30] Fix jenkinsfile --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8197ab9..c4923e6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,16 +8,16 @@ pipeline { // Check for spaces or mixed indentation sh ''' # Define file extensions to check - FILE_EXTENSIONS="css|json|js|java|htm|html|cpp|c|h|p|py|go|cs" + FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" echo "Checking for spaces in indentation..." - grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." + grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." echo "Checking for mixed indentation..." - grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." + grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." - if grep -nrP '^[ ]+' --include="*.{$FILE_EXTENSIONS}" . || \ - grep -nrP '^\t+ +' --include="*.{$FILE_EXTENSIONS}" .; then + if grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || \ + grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" .; then echo "Indentation issues detected. Please fix the above lines." exit 1 else From 12b37d2eb7dbe7e406116c6bdc4428401edfb8ee Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:51:38 -0800 Subject: [PATCH 08/30] Fix jenkinsfile --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index c4923e6..2106180 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,6 +7,8 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' + grep -P "test" <<< "test" || echo "grep -P not supported" + # Define file extensions to check FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" From 7ca3d19a2ade66fd798d59c535984d1b47f77703 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:54:29 -0800 Subject: [PATCH 09/30] Fix jenkinsfile --- Jenkinsfile | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2106180..48086a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,25 +7,15 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - grep -P "test" <<< "test" || echo "grep -P not supported" - - # Define file extensions to check - FILE_EXTENSIONS="css,json,js,java,htm,html,cpp,c,h,p,py,go,cs" - - echo "Checking for spaces in indentation..." - grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with spaces found." - - echo "Checking for mixed indentation..." - grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" . || echo "No lines with mixed indentation found." - - if grep -nrP "^[ ]+" --include="*.{$FILE_EXTENSIONS}" . || \ - grep -nrP "^\t+ +" --include="*.{$FILE_EXTENSIONS}" .; then - echo "Indentation issues detected. Please fix the above lines." + if grep -P "^[ ]+" -r --include=*.css ; then + echo "Error: Files contain spaces instead of tabs for indentation." exit 1 - else - echo "No indentation issues detected." - exit 0 fi + if grep -P "^\\t+ +" -r --include=*.css ; then + echo "Error: Files contain mixed tabs and spaces for indentation." + exit 1 + fi + echo "No indentation errors detected." ''' } } From 0bbceea47457209a1cd56d01c04c3ec413314601 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:57:07 -0800 Subject: [PATCH 10/30] Fix jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 48086a2..8bfd8ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,11 +7,12 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - if grep -P "^[ ]+" -r --include=*.css ; then + EXTENSIONS={css,js,json,java,bat,ps1,py,cs,html,c,cpp,h,hpp,cmd} + if grep -P "^[ ]+" -r --include=*.$EXTENSIONS ; then echo "Error: Files contain spaces instead of tabs for indentation." exit 1 fi - if grep -P "^\\t+ +" -r --include=*.css ; then + if grep -P "^\\t+ +" -r --include=*.$EXTENSIONS ; then echo "Error: Files contain mixed tabs and spaces for indentation." exit 1 fi From cab450235b07a27ee976d87b8dfaa26835462ff6 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 14:58:09 -0800 Subject: [PATCH 11/30] Fix jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8bfd8ea..d583b3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,12 +7,12 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - EXTENSIONS={css,js,json,java,bat,ps1,py,cs,html,c,cpp,h,hpp,cmd} - if grep -P "^[ ]+" -r --include=*.$EXTENSIONS ; then + EXTENSIONS=css,js,json,java,bat,ps1,py,cs,html,c,cpp,h,hpp,cmd + if grep -P "^[ ]+" -r --include=*.{$EXTENSIONS} ; then echo "Error: Files contain spaces instead of tabs for indentation." exit 1 fi - if grep -P "^\\t+ +" -r --include=*.$EXTENSIONS ; then + if grep -P "^\\t+ +" -r --include=*.{$EXTENSIONS} ; then echo "Error: Files contain mixed tabs and spaces for indentation." exit 1 fi From 0f3288145e186183873a50c82f6785039ffe0fb5 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:01:50 -0800 Subject: [PATCH 12/30] Fix jenkinsfile --- Jenkinsfile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d583b3c..6e962eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,16 +7,28 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - EXTENSIONS=css,js,json,java,bat,ps1,py,cs,html,c,cpp,h,hpp,cmd - if grep -P "^[ ]+" -r --include=*.{$EXTENSIONS} ; then - echo "Error: Files contain spaces instead of tabs for indentation." + FILE_EXTENSIONS="css json js java py ps1 cs cmd bat htm html cpp c h hpp" + + INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/') + + + # Convert FILE_EXTENSIONS to --include pattern + INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/') + + echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..." + grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with spaces found." + + echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..." + grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\(\\t* +\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with mixed indentation found." + + if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \ + grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then + echo "Indentation issues detected. Please fix the above lines." exit 1 + else + echo "No indentation issues detected." + exit 0 fi - if grep -P "^\\t+ +" -r --include=*.{$EXTENSIONS} ; then - echo "Error: Files contain mixed tabs and spaces for indentation." - exit 1 - fi - echo "No indentation errors detected." ''' } } From 76c4fbcc3dcc576cb7bbaa7d7cfe101eb5e8d4d0 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:03:01 -0800 Subject: [PATCH 13/30] Fix jenkinsfile --- Jenkinsfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6e962eb..527f1ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,15 +11,11 @@ pipeline { INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/') - - # Convert FILE_EXTENSIONS to --include pattern - INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/') - echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..." - grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with spaces found." + grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || echo "No lines with spaces found." echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..." - grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\(\\t* +\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with mixed indentation found." + grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . || echo "No lines with mixed indentation found." if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \ grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then From b225f3d1e24a3934978360165b9d9e3361fb208b Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:05:21 -0800 Subject: [PATCH 14/30] Fix jenkinsfile --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 527f1ed..f868094 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,13 +9,14 @@ pipeline { sh ''' FILE_EXTENSIONS="css json js java py ps1 cs cmd bat htm html cpp c h hpp" - INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*.*/g; s/^/*.*/') + # Convert FILE_EXTENSIONS to --include pattern + INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*./g; s/^/*./') echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..." - grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || echo "No lines with spaces found." + grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with spaces found." echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..." - grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . || echo "No lines with mixed indentation found." + grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\(\\t* +\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with mixed indentation found." if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \ grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then From cdc63f6fcdd69e65477845b4dda52fb62c8853f3 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:20:44 -0800 Subject: [PATCH 15/30] Fix jenkinsfile --- Jenkinsfile | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f868094..6569979 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,25 +7,38 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - FILE_EXTENSIONS="css json js java py ps1 cs cmd bat htm html cpp c h hpp" + FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" # Convert FILE_EXTENSIONS to --include pattern - INCLUDE_PATTERNS=$(echo $FILE_EXTENSIONS | sed 's/ /,*./g; s/^/*./') + + FILES=$(find . -regextype awk -regex '.*($FILETYPES)' -type f) - echo "Checking for lines starting with spaces in $FILE_EXTENSIONS files..." - grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with spaces found." + # Initialize the PROBLEMS variable + PROBLEMS="" - echo "Checking for lines with mixed tabs and spaces in $FILE_EXTENSIONS files..." - grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" . | sed 's/\\([^:]*\\):\\([^:]*\\):\\(\\t* +\\).*/File: \\1, Line: \\2, Found: \\3/' || echo "No lines with mixed indentation found." + echo "$FILES" | while IFS= read -r file; do + # Check for lines with spaces + GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS + fi - if grep -nrP '^[ ]+' --include="$INCLUDE_PATTERNS" . || \ - grep -nrP '^\t+ +' --include="$INCLUDE_PATTERNS" .; then - echo "Indentation issues detected. Please fix the above lines." - exit 1 - else - echo "No indentation issues detected." - exit 0 - fi + # Check for lines with mixed tabs and spaces + GREP_RESULT=$(grep -nrP '^\t+ +' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS + fi + done + + # Check if there were any problems + if [ -n "$PROBLEMS" ]; then + echo "Indentation issues detected. Please fix the above lines." + echo "$PROBLEMS" + exit 1 + else + echo "No indentation issues detected." + exit 0 + fi ''' } } From 6748e21345454aaa7cbe558d53eb38b5087ed1d3 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:22:11 -0800 Subject: [PATCH 16/30] Fix jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6569979..81560fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,15 +18,15 @@ pipeline { echo "$FILES" | while IFS= read -r file; do # Check for lines with spaces - GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') + GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/') if [ -n "$GREP_RESULT" ]; then PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS fi # Check for lines with mixed tabs and spaces - GREP_RESULT=$(grep -nrP '^\t+ +' "$file" | sed 's/\([^:]*\):\([^:]*\):\([ ]*\).*/File: \1, Line: \2, Found: \3/') + GREP_RESULT=$(grep -nrP '^\\t+ +' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/') if [ -n "$GREP_RESULT" ]; then - PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS + PROBLEMS="$PROBLEMS$GREP_RESULT"$'\\n' # Append the result to PROBLEMS fi done From 576c14dee51de5bee91d03d156e76bb7919b565b Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:40:16 -0800 Subject: [PATCH 17/30] Fix jenkinsfile --- Jenkinsfile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 81560fb..08617f4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,26 +7,24 @@ pipeline { script { // Check for spaces or mixed indentation sh ''' - FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" - - # Convert FILE_EXTENSIONS to --include pattern - - FILES=$(find . -regextype awk -regex '.*($FILETYPES)' -type f) - + # Save the results of the find command into a variable + FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" + FILES=$(find . -regextype awk -regex ".*\.($FILETYPES)" -type f) # Initialize the PROBLEMS variable PROBLEMS="" - echo "$FILES" | while IFS= read -r file; do + # Pass the files to grep and sed + for file in $FILES; do # Check for lines with spaces - GREP_RESULT=$(grep -nrP '^[ ]+' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/') + GREP_RESULT=$(grep -nrP '^[ ]+' "$file") if [ -n "$GREP_RESULT" ]; then - PROBLEMS="$PROBLEMS$GREP_RESULT"$'\n' # Append the result to PROBLEMS + PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS fi # Check for lines with mixed tabs and spaces - GREP_RESULT=$(grep -nrP '^\\t+ +' "$file" | sed 's/\\([^:]*\\):\\([^:]*\\):\\([ ]*\\).*/File: \\1, Line: \\2, Found: \\3/') + GREP_RESULT=$(grep -nrP '^\t+ +' "$file") if [ -n "$GREP_RESULT" ]; then - PROBLEMS="$PROBLEMS$GREP_RESULT"$'\\n' # Append the result to PROBLEMS + PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS fi done @@ -38,7 +36,7 @@ pipeline { else echo "No indentation issues detected." exit 0 - fi + fi ''' } } From 8d21ce7bec6b63bbef3a273e58d63e95b61d72d4 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:41:27 -0800 Subject: [PATCH 18/30] Fix jenkinsfile --- Jenkinsfile | 33 +-------------------------------- indentcheck.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100755 indentcheck.sh diff --git a/Jenkinsfile b/Jenkinsfile index 08617f4..79a843a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,38 +6,7 @@ pipeline { steps { script { // Check for spaces or mixed indentation - sh ''' - # Save the results of the find command into a variable - FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" - FILES=$(find . -regextype awk -regex ".*\.($FILETYPES)" -type f) - # Initialize the PROBLEMS variable - PROBLEMS="" - - # Pass the files to grep and sed - for file in $FILES; do - # Check for lines with spaces - GREP_RESULT=$(grep -nrP '^[ ]+' "$file") - if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS - fi - - # Check for lines with mixed tabs and spaces - GREP_RESULT=$(grep -nrP '^\t+ +' "$file") - if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS - fi - done - - # Check if there were any problems - if [ -n "$PROBLEMS" ]; then - echo "Indentation issues detected. Please fix the above lines." - echo "$PROBLEMS" - exit 1 - else - echo "No indentation issues detected." - exit 0 - fi - ''' + sh "./indentcheck.sh" } } } diff --git a/indentcheck.sh b/indentcheck.sh new file mode 100755 index 0000000..0b958c3 --- /dev/null +++ b/indentcheck.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Save the results of the find command into a variable +FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" +FILES=$(find . -regextype awk -regex ".*\.($FILETYPES)" -type f) +# Initialize the PROBLEMS variable +PROBLEMS="" + +# Pass the files to grep and sed +for file in $FILES; do + # Check for lines with spaces + GREP_RESULT=$(grep -nrP '^[ ]+' "$file") + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS + fi + + # Check for lines with mixed tabs and spaces + GREP_RESULT=$(grep -nrP '^\t+ +' "$file") + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS + fi +done + +# Check if there were any problems +if [ -n "$PROBLEMS" ]; then + echo "Indentation issues detected. Please fix the above lines." + echo "$PROBLEMS" + exit 1 +else + echo "No indentation issues detected." + exit 0 +fi From 058708c2c094930553a3e5e5dc91b73d59053911 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:45:49 -0800 Subject: [PATCH 19/30] Better Formatting --- indentcheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indentcheck.sh b/indentcheck.sh index 0b958c3..c6a2fac 100755 --- a/indentcheck.sh +++ b/indentcheck.sh @@ -1,6 +1,6 @@ #!/bin/bash # Save the results of the find command into a variable -FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp" +FILETYPES="css|json|js|java|py|ps1|cs|cmd|bat|htm|html|cpp|c|h|hpp|sh|bash" FILES=$(find . -regextype awk -regex ".*\.($FILETYPES)" -type f) # Initialize the PROBLEMS variable PROBLEMS="" @@ -10,13 +10,13 @@ for file in $FILES; do # Check for lines with spaces GREP_RESULT=$(grep -nrP '^[ ]+' "$file") if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS + PROBLEMS="${PROBLEMS}Space indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS fi # Check for lines with mixed tabs and spaces GREP_RESULT=$(grep -nrP '^\t+ +' "$file") if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}File $file:$GREP_RESULT"$'\n' # Append the result to PROBLEMS + PROBLEMS="${PROBLEMS}Mixed indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS fi done From 5c62ee577c3894b1ead0e1886e51a5c537b5a7da Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:46:50 -0800 Subject: [PATCH 20/30] Better Formatting --- css/theme-flaredefault-dark.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index b062a42..67676bc 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -1,11 +1,11 @@ @import url("./theme-gitea-dark\.css"); body { - background: #333; + background: #333; } #navbar{ - background: linear-gradient(#df852b, #c4792f); + background: linear-gradient(#df852b, #c4792f); color: black; font-weight: bold; font-size: 150%; From accb2a9fc5dd451ed5a4b7f1aece117340c26876 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:47:18 -0800 Subject: [PATCH 21/30] Fix format errors --- indentcheck.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/indentcheck.sh b/indentcheck.sh index c6a2fac..0003ede 100755 --- a/indentcheck.sh +++ b/indentcheck.sh @@ -7,25 +7,25 @@ PROBLEMS="" # Pass the files to grep and sed for file in $FILES; do - # Check for lines with spaces - GREP_RESULT=$(grep -nrP '^[ ]+' "$file") - if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}Space indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS - fi + # Check for lines with spaces + GREP_RESULT=$(grep -nrP '^[ ]+' "$file") + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="${PROBLEMS}Space indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS + fi - # Check for lines with mixed tabs and spaces - GREP_RESULT=$(grep -nrP '^\t+ +' "$file") - if [ -n "$GREP_RESULT" ]; then - PROBLEMS="${PROBLEMS}Mixed indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS - fi + # Check for lines with mixed tabs and spaces + GREP_RESULT=$(grep -nrP '^\t+ +' "$file") + if [ -n "$GREP_RESULT" ]; then + PROBLEMS="${PROBLEMS}Mixed indentation in file $file:"$'\n'"$GREP_RESULT"$'\n\n\n' # Append the result to PROBLEMS + fi done # Check if there were any problems if [ -n "$PROBLEMS" ]; then - echo "Indentation issues detected. Please fix the above lines." - echo "$PROBLEMS" - exit 1 + echo "Indentation issues detected. Please fix the above lines." + echo "$PROBLEMS" + exit 1 else - echo "No indentation issues detected." - exit 0 + echo "No indentation issues detected." + exit 0 fi From 209b8417c18b22a2cf05d5e0a38625af871e482f Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:55:40 -0800 Subject: [PATCH 22/30] Updated url to be absolute --- css/theme-flaredefault-dark.css | 2 +- css/theme-flaredefault-light.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index 67676bc..d8e471c 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -1,4 +1,4 @@ -@import url("./theme-gitea-dark\.css"); +@import url("/assets/css/theme-gitea-dark.css"); body { background: #333; diff --git a/css/theme-flaredefault-light.css b/css/theme-flaredefault-light.css index 96905ed..1bf52c3 100644 --- a/css/theme-flaredefault-light.css +++ b/css/theme-flaredefault-light.css @@ -1,4 +1,4 @@ -@import url("./theme-gitea-light.css"); +@import url("/assets/css/theme-gitea-light.css"); body { background-color: #E0E0E0 !important; From c710020aa489b0b0680ad58130436478697baa50 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 15:58:55 -0800 Subject: [PATCH 23/30] Updated url to be absolute --- css/theme-flaredefault-auto.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/theme-flaredefault-auto.css b/css/theme-flaredefault-auto.css index 905e32e..446e843 100644 --- a/css/theme-flaredefault-auto.css +++ b/css/theme-flaredefault-auto.css @@ -1,2 +1,2 @@ -@import url("./theme-flaredefault-light.css") (prefers-color-scheme: light); -@import url("./theme-flaredefault-dark.css") (prefers-color-scheme: dark); \ No newline at end of file +@import url("/assets/css/theme-flaredefault-light.css") (prefers-color-scheme: light); +@import url("/assets/css/theme-flaredefault-dark.css") (prefers-color-scheme: dark); \ No newline at end of file From 605ec70e60d65ab30cf146b86647e71f21cca5a3 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:01:02 -0800 Subject: [PATCH 24/30] Remove url() for import --- css/theme-flaredefault-auto.css | 4 ++-- css/theme-flaredefault-dark.css | 2 +- css/theme-flaredefault-light.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/css/theme-flaredefault-auto.css b/css/theme-flaredefault-auto.css index 446e843..f9c9201 100644 --- a/css/theme-flaredefault-auto.css +++ b/css/theme-flaredefault-auto.css @@ -1,2 +1,2 @@ -@import url("/assets/css/theme-flaredefault-light.css") (prefers-color-scheme: light); -@import url("/assets/css/theme-flaredefault-dark.css") (prefers-color-scheme: dark); \ No newline at end of file +@import "./theme-flaredefault-light.css" (prefers-color-scheme: light); +@import "./theme-flaredefault-dark.css" (prefers-color-scheme: dark); \ No newline at end of file diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index d8e471c..5ae4313 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -1,4 +1,4 @@ -@import url("/assets/css/theme-gitea-dark.css"); +@import "./theme-gitea-dark.css"; body { background: #333; diff --git a/css/theme-flaredefault-light.css b/css/theme-flaredefault-light.css index 1bf52c3..cc64825 100644 --- a/css/theme-flaredefault-light.css +++ b/css/theme-flaredefault-light.css @@ -1,4 +1,4 @@ -@import url("/assets/css/theme-gitea-light.css"); +@import "./theme-gitea-light.css"; body { background-color: #E0E0E0 !important; From 507244af67d1119965124f832e6d893ce00cea7d Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:01:40 -0800 Subject: [PATCH 25/30] Attempt fallback --- css/theme-flaredefault-auto.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/theme-flaredefault-auto.css b/css/theme-flaredefault-auto.css index f9c9201..8783f75 100644 --- a/css/theme-flaredefault-auto.css +++ b/css/theme-flaredefault-auto.css @@ -1,2 +1,3 @@ +@import "./theme-flaredefault-light.css" @import "./theme-flaredefault-light.css" (prefers-color-scheme: light); @import "./theme-flaredefault-dark.css" (prefers-color-scheme: dark); \ No newline at end of file From ac9b7ed8964cabace4e6e069329061e9e653353f Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:03:27 -0800 Subject: [PATCH 26/30] Attempt fallback --- css/theme-flaredefault-auto.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/theme-flaredefault-auto.css b/css/theme-flaredefault-auto.css index 8783f75..3e80d99 100644 --- a/css/theme-flaredefault-auto.css +++ b/css/theme-flaredefault-auto.css @@ -1,3 +1,3 @@ -@import "./theme-flaredefault-light.css" +@import "./theme-flaredefault-light.css"; @import "./theme-flaredefault-light.css" (prefers-color-scheme: light); @import "./theme-flaredefault-dark.css" (prefers-color-scheme: dark); \ No newline at end of file From 61131cf2f55d37a8d5b478bf4d799a2e884c88c1 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:04:00 -0800 Subject: [PATCH 27/30] Attempt fallback --- css/theme-flaredefault-auto.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/css/theme-flaredefault-auto.css b/css/theme-flaredefault-auto.css index 3e80d99..10756a9 100644 --- a/css/theme-flaredefault-auto.css +++ b/css/theme-flaredefault-auto.css @@ -1,3 +1,3 @@ -@import "./theme-flaredefault-light.css"; -@import "./theme-flaredefault-light.css" (prefers-color-scheme: light); -@import "./theme-flaredefault-dark.css" (prefers-color-scheme: dark); \ No newline at end of file +@import url("./theme-flaredefault-light.css"); +@import url("./theme-flaredefault-light.css") (prefers-color-scheme: light); +@import url("./theme-flaredefault-dark.css") (prefers-color-scheme: dark); \ No newline at end of file From 5ce3568655895152bbea2effb3eb6e3e1dce37db Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:04:41 -0800 Subject: [PATCH 28/30] Fix URL --- css/theme-flaredefault-dark.css | 2 +- css/theme-flaredefault-light.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index 5ae4313..5a8c164 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -1,4 +1,4 @@ -@import "./theme-gitea-dark.css"; +@import url("./theme-gitea-dark.css"); body { background: #333; diff --git a/css/theme-flaredefault-light.css b/css/theme-flaredefault-light.css index cc64825..96905ed 100644 --- a/css/theme-flaredefault-light.css +++ b/css/theme-flaredefault-light.css @@ -1,4 +1,4 @@ -@import "./theme-gitea-light.css"; +@import url("./theme-gitea-light.css"); body { background-color: #E0E0E0 !important; From 02053c0424011fb12750ebc1adbe6c9a691647f5 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:06:13 -0800 Subject: [PATCH 29/30] Fix importance --- css/theme-flaredefault-light.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/theme-flaredefault-light.css b/css/theme-flaredefault-light.css index 96905ed..6b80c9b 100644 --- a/css/theme-flaredefault-light.css +++ b/css/theme-flaredefault-light.css @@ -1,7 +1,7 @@ @import url("./theme-gitea-light.css"); body { - background-color: #E0E0E0 !important; + background-color: #E0E0E0; } #navbar{ From 0a5f27a58d426a3bad212991f6901f146ef34e49 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Sat, 11 Jan 2025 16:07:11 -0800 Subject: [PATCH 30/30] Fix footer --- css/theme-flaredefault-dark.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/theme-flaredefault-dark.css b/css/theme-flaredefault-dark.css index 5a8c164..2ee4c40 100644 --- a/css/theme-flaredefault-dark.css +++ b/css/theme-flaredefault-dark.css @@ -39,6 +39,7 @@ body { } .page-footer{ + background: linear-gradient(#222, #111); box-shadow: 0 -2px 5px rgba(0, 0, 0, 20%); }