ci: add EditorConfig + checker job

Adds .editorconfig pinning UTF-8, LF line endings, final newlines, and
trailing-whitespace stripping repo-wide. YAML gets 2-space indent;
shell scripts get space-only (size left unenforced for existing 3-space
files). Vendored / machine-generated trees are exempt:
src/m68000 (UAE 68K core), src/bios/jag*.c (bin2c hex tables), and
libretro-common (vendored).

Wires editorconfig-checker v3.0.3 into c-cpp.yml as a new job so
deviations show up at PR time. .ecrc carries the binary-file glob
exclusions (ROMs, baselines, build artifacts, vendored sources) since
.editorconfig itself can't skip files entirely.

Drive-by cleanups to satisfy the new check:
- Strip trailing whitespace from CODEOWNERS, Makefile, src/cd/cdrom.c,
  src/jerry/jerry.h, src/tom/{blitter,gpu,op,tom}.c.
- Convert .gitlab-ci.yml from CRLF to LF.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
Joseph MattielloandClaude Opus 4.7 committed 2026-04-30 23:36:48 -04:00
1 parent 10de094a90
commit 5e6ca34fe5
12 files changed
+330 -242

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
{
"Exclude": [
"test/roms/.*",
"test/baselines/.*",
"test/tools/build/.*",
"build/.*",
"src/m68000/.*",
"src/bios/jag.*\\.c$",
"libretro-common/.*",
"docs/atari-jaguar-1999/.*",
".*\\.(png|jpg|jpeg|gif|bmp|ico|pdf|j64|jag|rom|cof|abs|bin|chd|cue|iso|cdi|so|dll|dylib|a|o|bc|exe|dat|gz|tar|zip|tgz|7z)$"
],
"Disable": {
"MaxLineLength": true
}
}
+56
View File
@@ -0,0 +1,56 @@
# EditorConfig: https://editorconfig.org
#
# Project-wide consistency for line endings / charset / final newline.
# Indentation style is intentionally NOT enforced for C sources here:
# the upstream Virtual Jaguar tree mixes tabs (src/tom, src/jerry) with
# 4-space (libretro.c, src/core/cheat.c) and a sweeping reformat is out
# of scope. Makefiles (tabs required) and YAML (2-space) are pinned.
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Makefiles: recipe lines must be tabs (make will fail loudly if not),
# but ifeq/else if blocks in this tree mix tab/space indentation for
# readability; we don't enforce a single style here.
# GitHub Actions / generic YAML.
[*.{yml,yaml}]
indent_style = space
indent_size = 2
# Shell scripts: only enforce no-tabs; the existing tree uses 3-space
# in some files and 2-space in others, both fine.
[*.sh]
indent_style = space
# Markdown: trailing two spaces are a hard line-break — don't strip.
[*.md]
trim_trailing_whitespace = false
# Machine-generated UAE 68K core: do not touch.
[src/m68000/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
# Embedded BIOS / boot stubs are bin2c-generated hex arrays;
# every line ends in trailing whitespace by design.
[src/bios/jag*.c]
trim_trailing_whitespace = unset
# libretro-common is a vendored subtree.
[libretro-common/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
+1 -1
View File
@@ -1 +1 @@
* @JoeMatt @twinaphex
* @JoeMatt @twinaphex
+16
View File
@@ -335,6 +335,22 @@ jobs:
path: virtualjaguar_libretro_libnx.a
if-no-files-found: error
editorconfig-lint:
name: EditorConfig compliance check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install editorconfig-checker
run: |
VERSION=v3.0.3
curl -fsSL "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/${VERSION}/ec-linux-amd64.tar.gz" \
| tar -xz -C /tmp
sudo install -m 0755 /tmp/bin/ec-linux-amd64 /usr/local/bin/ec
- name: Run editorconfig-checker
run: ec -verbose
c89-lint:
name: C89 compliance check
runs-on: ubuntu-latest
+229 -229
View File
@@ -1,229 +1,229 @@
# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
##############################################################################
################################# BOILERPLATE ################################
##############################################################################
# Core definitions
.core-defs:
variables:
JNI_PATH: .
CORENAME: virtualjaguar
# Inclusion templates, required for the build to work
include:
################################## DESKTOPS ################################
# Windows 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-mingw.yml'
# Windows 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-mingw.yml'
# Windows msvc10 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-msvc10-msys2.yml'
# Windows msvc10 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc10-msys2.yml'
# Windows msvc05 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc05-msys2.yml'
# Linux 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-x64.yml'
# Linux 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-i686.yml'
# Linux 64-bit (ARM)
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-aarch64.yml'
# MacOS 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-x64.yml'
# MacOS ARM 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-arm64.yml'
################################## CELLULAR ################################
# Android
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
# iOS
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-arm64.yml'
# iOS (armv7)
- project: 'libretro-infrastructure/ci-templates'
file: '/ios9.yml'
################################## CONSOLES ################################
# PlayStation Vita
- project: 'libretro-infrastructure/ci-templates'
file: '/vita-static.yml'
# Nintendo Switch
- project: 'libretro-infrastructure/ci-templates'
file: '/libnx-static.yml'
# tvOS (AppleTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'
#################################### MISC ##################################
# Emscripten (WebAssembly)
- project: 'libretro-infrastructure/ci-templates'
file: '/emscripten-static.yml'
# webOS 32-bit (LGTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/webos-make.yml'
# Stages for building
stages:
- build-prepare
- build-shared
- build-static
##############################################################################
#################################### STAGES ##################################
##############################################################################
#
################################### DESKTOPS #################################
# Windows 64-bit
libretro-build-windows-x64:
extends:
- .libretro-windows-x64-mingw-make-default
- .core-defs
# Windows 32-bit
libretro-build-windows-i686:
extends:
- .libretro-windows-i686-mingw-make-default
- .core-defs
# Windows msvc10 64-bit
libretro-build-windows-msvc10-x64:
extends:
- .libretro-windows-x64-msvc10-msys2-make-default
- .core-defs
# Windows msvc10 32-bit
libretro-build-windows-msvc10-i686:
extends:
- .libretro-windows-i686-msvc10-msys2-make-default
- .core-defs
# Windows msvc05 32-bit
libretro-build-windows-msvc05-i686:
extends:
- .libretro-windows-i686-msvc05-msys2-make-default
- .core-defs
# Linux 64-bit
libretro-build-linux-x64:
extends:
- .libretro-linux-x64-make-default
- .core-defs
# Linux 32-bit
libretro-build-linux-i686:
extends:
- .libretro-linux-i686-make-default
- .core-defs
# Linux 64-bit (ARM)
libretro-build-linux-aarch64:
extends:
- .libretro-linux-aarch64-make-default
- .core-defs
# MacOS 64-bit
libretro-build-osx-x64:
extends:
- .libretro-osx-x64-make-default
- .core-defs
# MacOS ARM 64-bit
libretro-build-osx-arm64:
extends:
- .libretro-osx-arm64-make-default
- .core-defs
################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:
extends:
- .libretro-android-jni-armeabi-v7a
- .core-defs
# Android ARMv8a
android-arm64-v8a:
extends:
- .libretro-android-jni-arm64-v8a
- .core-defs
# Android 64-bit x86
android-x86_64:
extends:
- .libretro-android-jni-x86_64
- .core-defs
# Android 32-bit x86
android-x86:
extends:
- .libretro-android-jni-x86
- .core-defs
# iOS
libretro-build-ios-arm64:
extends:
- .libretro-ios-arm64-make-default
- .core-defs
# iOS (armv7) [iOS 9 and up]
libretro-build-ios9:
extends:
- .libretro-ios9-make-default
- .core-defs
# tvOS
libretro-build-tvos-arm64:
extends:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
# PlayStation Vita
libretro-build-vita:
extends:
- .libretro-vita-static-retroarch-master
- .core-defs
# Nintendo Switch
libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-retroarch-master
- .core-defs
#################################### MISC ####################################
# Emscripten (WebAssembly)
libretro-build-emscripten:
extends:
- .libretro-emscripten-static-retroarch-master
- .core-defs
# webOS 32-bit
libretro-build-webos-armv7a:
extends:
- .libretro-webos-armv7a-make-default
- .core-defs
# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
##############################################################################
################################# BOILERPLATE ################################
##############################################################################
# Core definitions
.core-defs:
variables:
JNI_PATH: .
CORENAME: virtualjaguar
# Inclusion templates, required for the build to work
include:
################################## DESKTOPS ################################
# Windows 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-mingw.yml'
# Windows 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-mingw.yml'
# Windows msvc10 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-x64-msvc10-msys2.yml'
# Windows msvc10 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc10-msys2.yml'
# Windows msvc05 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/windows-i686-msvc05-msys2.yml'
# Linux 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-x64.yml'
# Linux 32-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-i686.yml'
# Linux 64-bit (ARM)
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-aarch64.yml'
# MacOS 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-x64.yml'
# MacOS ARM 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-arm64.yml'
################################## CELLULAR ################################
# Android
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
# iOS
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-arm64.yml'
# iOS (armv7)
- project: 'libretro-infrastructure/ci-templates'
file: '/ios9.yml'
################################## CONSOLES ################################
# PlayStation Vita
- project: 'libretro-infrastructure/ci-templates'
file: '/vita-static.yml'
# Nintendo Switch
- project: 'libretro-infrastructure/ci-templates'
file: '/libnx-static.yml'
# tvOS (AppleTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'
#################################### MISC ##################################
# Emscripten (WebAssembly)
- project: 'libretro-infrastructure/ci-templates'
file: '/emscripten-static.yml'
# webOS 32-bit (LGTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/webos-make.yml'
# Stages for building
stages:
- build-prepare
- build-shared
- build-static
##############################################################################
#################################### STAGES ##################################
##############################################################################
#
################################### DESKTOPS #################################
# Windows 64-bit
libretro-build-windows-x64:
extends:
- .libretro-windows-x64-mingw-make-default
- .core-defs
# Windows 32-bit
libretro-build-windows-i686:
extends:
- .libretro-windows-i686-mingw-make-default
- .core-defs
# Windows msvc10 64-bit
libretro-build-windows-msvc10-x64:
extends:
- .libretro-windows-x64-msvc10-msys2-make-default
- .core-defs
# Windows msvc10 32-bit
libretro-build-windows-msvc10-i686:
extends:
- .libretro-windows-i686-msvc10-msys2-make-default
- .core-defs
# Windows msvc05 32-bit
libretro-build-windows-msvc05-i686:
extends:
- .libretro-windows-i686-msvc05-msys2-make-default
- .core-defs
# Linux 64-bit
libretro-build-linux-x64:
extends:
- .libretro-linux-x64-make-default
- .core-defs
# Linux 32-bit
libretro-build-linux-i686:
extends:
- .libretro-linux-i686-make-default
- .core-defs
# Linux 64-bit (ARM)
libretro-build-linux-aarch64:
extends:
- .libretro-linux-aarch64-make-default
- .core-defs
# MacOS 64-bit
libretro-build-osx-x64:
extends:
- .libretro-osx-x64-make-default
- .core-defs
# MacOS ARM 64-bit
libretro-build-osx-arm64:
extends:
- .libretro-osx-arm64-make-default
- .core-defs
################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:
extends:
- .libretro-android-jni-armeabi-v7a
- .core-defs
# Android ARMv8a
android-arm64-v8a:
extends:
- .libretro-android-jni-arm64-v8a
- .core-defs
# Android 64-bit x86
android-x86_64:
extends:
- .libretro-android-jni-x86_64
- .core-defs
# Android 32-bit x86
android-x86:
extends:
- .libretro-android-jni-x86
- .core-defs
# iOS
libretro-build-ios-arm64:
extends:
- .libretro-ios-arm64-make-default
- .core-defs
# iOS (armv7) [iOS 9 and up]
libretro-build-ios9:
extends:
- .libretro-ios9-make-default
- .core-defs
# tvOS
libretro-build-tvos-arm64:
extends:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
# PlayStation Vita
libretro-build-vita:
extends:
- .libretro-vita-static-retroarch-master
- .core-defs
# Nintendo Switch
libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-retroarch-master
- .core-defs
#################################### MISC ####################################
# Emscripten (WebAssembly)
libretro-build-emscripten:
extends:
- .libretro-emscripten-static-retroarch-master
- .core-defs
# webOS 32-bit
libretro-build-webos-armv7a:
extends:
- .libretro-webos-armv7a-make-default
- .core-defs
+5 -5
View File
@@ -82,8 +82,8 @@ ifeq ($(platform), unix)
# Platform affix = classic_<ISA>_<µARCH>
# Help at https://modmyclassic.com/comp
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
else ifeq ($(platform), classic_armv7_a7)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
@@ -108,8 +108,8 @@ else ifeq ($(platform), classic_armv7_a7)
LDFLAGS += -static-libgcc -static-libstdc++
endif
endif
#######################################
#######################################
# OSX
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
@@ -624,7 +624,7 @@ CFLAGS += -DDEBUG_PRESENTATION
endif
OBJOUT = -o
LINKOUT = -o
LINKOUT = -o
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
+1 -1
View File
@@ -125,7 +125,7 @@
;
eeprom equ $DFFF2c ;interface to CD-eeprom
;
; bit3 - busy if 0 after write cmd, or Data In after read cmd
; bit3 - busy if 0 after write cmd, or Data In after read cmd
; bit2 - Data Out
; bit1 - clock
; bit0 - Chip Select (CS)
+1 -1
View File
@@ -37,7 +37,7 @@ enum
IRQ2_TIMER1=0x04,
IRQ2_TIMER2=0x08,
IRQ2_ASI=0x10,
IRQ2_SSI=0x20
IRQ2_SSI=0x20
};
bool JERRYIRQEnabled(int irq);
+1 -1
View File
@@ -1662,7 +1662,7 @@ A2ptrldi := NAN2 (a2ptrldi, a2update\, a2pldt);*/
else
inner_mask = 0;
/* The actual mask used should be the
/* The actual mask used should be the
lesser of the window masks and
the inner mask, where is all cases 000 means 1000. */
window_mask = (window_mask == 0 ? 0x40 : window_mask);
+1 -1
View File
@@ -338,7 +338,7 @@ uint32_t GPUReadLong(uint32_t offset, uint32_t who/*=UNKNOWN*/)
if (offset >= 0xF02000 && offset <= 0xF020FF)
{
uint32_t reg = (offset & 0xFC) >> 2;
return (reg < 32 ? gpu_reg_bank_0[reg] : gpu_reg_bank_1[reg - 32]);
return (reg < 32 ? gpu_reg_bank_0[reg] : gpu_reg_bank_1[reg - 32]);
}
if ((offset >= GPU_WORK_RAM_BASE) && (offset <= GPU_WORK_RAM_BASE + 0x0FFC))
+1 -1
View File
@@ -535,7 +535,7 @@ void OPProcessFixedBitmap(uint64_t p0, uint64_t p1, bool render)
uint32_t lbufAddress;
uint8_t * currentLineBuffer;
int32_t startPos,endPos;
// This is correct, the OP line buffer is a constant size...
// This is correct, the OP line buffer is a constant size...
int32_t limit = 720;
int32_t lbufWidth = 719;
uint32_t clippedWidth = 0, phraseClippedWidth = 0, dataClippedWidth = 0;//, phrasePixel = 0;
+2 -2
View File
@@ -307,7 +307,7 @@ uint8_t greencv[16][16] = {
{ 0, 19, 38, 57,77, 96, 115,134,154,173,192,211,231,250,255,255}, // E
{ 0, 17, 34, 51,68, 85, 102,119,136,153,170,187,204,221,238,255} // F
};
// Blue Color Values for CrY<->RGB Color Conversion
uint8_t bluecv[16][16] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -455,7 +455,7 @@ void TOMFillLookupTables(void)
{
// NOTE: Jaguar 16-bit (non-CRY) color is RBG 556 like so:
// RRRR RBBB BBGG GGGG
unsigned i;
for(i=0; i<0x10000; i++)
RGB16ToRGB32[i] = 0xFF000000