Browse Source

Enforce `-strict-style` in CI

gingerBill 3 years ago
parent
commit
da1edac56d
3 changed files with 7 additions and 7 deletions
  1. 3 3
      .github/workflows/ci.yml
  2. 3 3
      core/os/os_darwin.odin
  3. 1 1
      core/testing/runner_other.odin

+ 3 - 3
.github/workflows/ci.yml

@@ -26,7 +26,7 @@ jobs:
         run: ./odin run examples/demo -debug
         run: ./odin run examples/demo -debug
         timeout-minutes: 10
         timeout-minutes: 10
       - name: Odin check examples/all
       - name: Odin check examples/all
-        run: ./odin check examples/all
+        run: ./odin check examples/all -strict-style
         timeout-minutes: 10
         timeout-minutes: 10
       - name: Core library tests
       - name: Core library tests
         run: |
         run: |
@@ -66,7 +66,7 @@ jobs:
         run: ./odin run examples/demo -debug
         run: ./odin run examples/demo -debug
         timeout-minutes: 10
         timeout-minutes: 10
       - name: Odin check examples/all
       - name: Odin check examples/all
-        run: ./odin check examples/all
+        run: ./odin check examples/all -strict-style
         timeout-minutes: 10
         timeout-minutes: 10
       - name: Core library tests
       - name: Core library tests
         run: |
         run: |
@@ -115,7 +115,7 @@ jobs:
         shell: cmd
         shell: cmd
         run: |
         run: |
           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
-          odin check examples/all
+          odin check examples/all -strict-style
         timeout-minutes: 10
         timeout-minutes: 10
       - name: Core library tests
       - name: Core library tests
         shell: cmd
         shell: cmd

+ 3 - 3
core/os/os_darwin.odin

@@ -296,7 +296,7 @@ foreign libc {
 	@(link_name="readdir_r$INODE64") _unix_readdir_r    :: proc(dirp: Dir, entry: ^Dirent, result: ^^Dirent) -> c.int ---
 	@(link_name="readdir_r$INODE64") _unix_readdir_r    :: proc(dirp: Dir, entry: ^Dirent, result: ^^Dirent) -> c.int ---
 	@(link_name="fcntl")            _unix_fcntl         :: proc(fd: Handle, cmd: c.int, buf: ^byte) -> c.int ---
 	@(link_name="fcntl")            _unix_fcntl         :: proc(fd: Handle, cmd: c.int, buf: ^byte) -> c.int ---
 
 
-	@(link_name="fchmod") _unix_fchmod :: proc(fildes: Handle, mode: u16) -> c.int ---;
+	@(link_name="fchmod") _unix_fchmod :: proc(fildes: Handle, mode: u16) -> c.int ---
 
 
 	@(link_name="malloc")   _unix_malloc   :: proc(size: int) -> rawptr ---
 	@(link_name="malloc")   _unix_malloc   :: proc(size: int) -> rawptr ---
 	@(link_name="calloc")   _unix_calloc   :: proc(num, size: int) -> rawptr ---
 	@(link_name="calloc")   _unix_calloc   :: proc(num, size: int) -> rawptr ---
@@ -307,7 +307,7 @@ foreign libc {
 	@(link_name="chdir")    _unix_chdir    :: proc(buf: cstring) -> c.int ---
 	@(link_name="chdir")    _unix_chdir    :: proc(buf: cstring) -> c.int ---
 	@(link_name="realpath") _unix_realpath :: proc(path: cstring, resolved_path: rawptr) -> rawptr ---
 	@(link_name="realpath") _unix_realpath :: proc(path: cstring, resolved_path: rawptr) -> rawptr ---
 
 
-	@(link_name="strerror") _darwin_string_error :: proc(num : c.int) -> cstring ---;
+	@(link_name="strerror") _darwin_string_error :: proc(num : c.int) -> cstring ---
 
 
 	@(link_name="exit")    _unix_exit :: proc(status: c.int) -> ! ---
 	@(link_name="exit")    _unix_exit :: proc(status: c.int) -> ! ---
 }
 }
@@ -324,7 +324,7 @@ get_last_error :: proc() -> int {
 }
 }
 
 
 get_last_error_string :: proc() -> string {
 get_last_error_string :: proc() -> string {
-	return cast(string)_darwin_string_error(cast(c.int)get_last_error());
+	return cast(string)_darwin_string_error(cast(c.int)get_last_error())
 }
 }
 
 
 open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno) {
 open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno) {

+ 1 - 1
core/testing/runner_other.odin

@@ -6,7 +6,7 @@ import "core:time"
 
 
 run_internal_test :: proc(t: ^T, it: Internal_Test) {
 run_internal_test :: proc(t: ^T, it: Internal_Test) {
 	// TODO(bill): Catch panics on other platforms
 	// TODO(bill): Catch panics on other platforms
-	it.p(t);
+	it.p(t)
 }
 }
 
 
 _fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {
 _fail_timeout :: proc(t: ^T, duration: time.Duration, loc := #caller_location) {