ci: code analysis
This commit is contained in:
parent
2a1dbf2e57
commit
1110bc9ac7
26
.github/workflows/analyze.yml
vendored
Normal file
26
.github/workflows/analyze.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: Code Analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install shellcheck cppcheck
|
||||||
|
|
||||||
|
- name: Run shellcheck
|
||||||
|
run: |
|
||||||
|
shellcheck ./build.sh ./releasetools/cdimage.sh ./releasetools/floppyimage.sh ./releasetools/hdimages.sh ./releasetools/image.defaults ./releasetools/images.functions
|
||||||
|
|
||||||
|
- name: Run CppCheck
|
||||||
|
run: |
|
||||||
|
cppcheck -x c --std=c89 --quiet --error-exitcode=2 include sbin bin
|
9
Makefile
9
Makefile
|
@ -16,13 +16,10 @@ RM = rm -f
|
||||||
MK_BUGREPORT := \"https://git.cute.engineering/d0p1/StupidOS/issues\"
|
MK_BUGREPORT := \"https://git.cute.engineering/d0p1/StupidOS/issues\"
|
||||||
MK_COMMIT := \"$(shell git rev-parse --short HEAD)\"
|
MK_COMMIT := \"$(shell git rev-parse --short HEAD)\"
|
||||||
|
|
||||||
ifneq (,$(findstring cl,$(CC)))
|
|
||||||
CFLAGS = /TC /D MK_COMMIT="$(MK_COMMIT)" /DMK_BUGREPORT="$(MK_BUGREPORT)" /INCLUDE:$(TOPDIR)include
|
|
||||||
LDFLAGS = /SUBSYSTEM:CONSOLE
|
|
||||||
else
|
|
||||||
CFLAGS = -DMK_COMMIT="$(MK_COMMIT)" -DMK_BUGREPORT="$(MK_BUGREPORT)" -I$(TOPDIR)include
|
CFLAGS = -DMK_COMMIT="$(MK_COMMIT)" -DMK_BUGREPORT="$(MK_BUGREPORT)" -I$(TOPDIR)include
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
endif
|
|
||||||
|
|
||||||
QEMU_COMMON = \
|
QEMU_COMMON = \
|
||||||
-rtc base=localtime \
|
-rtc base=localtime \
|
||||||
|
@ -93,7 +90,7 @@ run: all
|
||||||
-drive file=fat:rw:./sysroot,if=none,id=hdd \
|
-drive file=fat:rw:./sysroot,if=none,id=hdd \
|
||||||
-device floppy,drive=boot \
|
-device floppy,drive=boot \
|
||||||
-device ide-hd,drive=hdd \
|
-device ide-hd,drive=hdd \
|
||||||
-global isa-fdc.bootindexA=0 \
|
-global isa-fdc.bootindexA=0
|
||||||
|
|
||||||
.PHONY: run-iso
|
.PHONY: run-iso
|
||||||
run-iso: all
|
run-iso: all
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
struc
|
|
||||||
{
|
|
||||||
.boot_jmp db 3 dup(?)
|
|
||||||
}
|
|
||||||
|
|
||||||
disk_read_sectors:
|
disk_read_sectors:
|
||||||
test byte [drive_lba], 1
|
test byte [drive_lba], 1
|
||||||
|
|
|
@ -123,10 +123,9 @@ drive_lba db 0
|
||||||
|
|
||||||
msg_stage2 db "StupidOS Loader", 0
|
msg_stage2 db "StupidOS Loader", 0
|
||||||
kernel_fat12_file db "VMSTUPIDSYS", 0
|
kernel_fat12_file db "VMSTUPIDSYS", 0
|
||||||
config_fat12_file db "BOOT INI", 0
|
|
||||||
msg_error_a20 db "ERROR: can't enable a20 line", 0
|
msg_error_a20 db "ERROR: can't enable a20 line", 0
|
||||||
msg_error_memory db "ERROR: can't detect available memory", 0
|
msg_error_memory db "ERROR: can't detect available memory", 0
|
||||||
msg_error_sector db "ERROR: reading sector", CR, LF, 0
|
msg_error_sector db "ERROR: reading sector", CR, LF, 0
|
||||||
msg_error_not_found db "ERROR: kernel not found", 0
|
msg_error_not_found db "ERROR: kernel not found", 0
|
||||||
|
|
||||||
use32
|
use32
|
||||||
|
|
Loading…
Reference in a new issue