From 0e6238a6ab8643df6404f7c0280242df2812f6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xenxo=20Espasand=C3=ADn?= Date: Fri, 26 Jan 2024 18:47:58 +0100 Subject: [PATCH] fix(linter): cleanup linter hints (#189) --- README.md | 3 ++- include/xsk/arc/common/types.hpp | 5 ++--- include/xsk/gsc/common/types.hpp | 5 ++--- src/arc/common/ast.cpp | 1 - src/tool/main.cpp | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 36169750..980865b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![build](https://github.com/xensik/gsc-tool/workflows/Build/badge.svg)](https://github.com/xensik/gsc-tool/actions) -![license](https://img.shields.io/github/license/xensik/gsc-tool.svg) +[![sonar](https://sonarcloud.io/api/project_badges/measure?project=xensik_gsc-tool&metric=alert_status)](https://sonarcloud.io/summary/overall?id=xensik_gsc-tool) [![issues](https://img.shields.io/github/issues/xensik/gsc-tool)](https://github.com/xensik/gsc-tool/issues) +[![license](https://img.shields.io/github/license/xensik/gsc-tool.svg)](https://github.com/xensik/gsc-tool/blob/dev/LICENSE) [![releases](https://img.shields.io/github/v/release/xensik/gsc-tool)](https://github.com/xensik/gsc-tool/releases) [![paypal](https://img.shields.io/badge/PayPal-support-blue.svg?logo=paypal)](https://www.paypal.me/xensik) diff --git a/include/xsk/arc/common/types.hpp b/include/xsk/arc/common/types.hpp index fc2accbd..11e55ca4 100644 --- a/include/xsk/arc/common/types.hpp +++ b/include/xsk/arc/common/types.hpp @@ -29,10 +29,9 @@ enum class instance : u8 enum class build : u8 { - prod = 0 << 0, + prod = 0, dev_blocks = 1 << 0, dev_maps = 1 << 1, - dev = dev_blocks | dev_maps, }; @@ -71,7 +70,7 @@ struct props { enum values : u32 { - none = 0 << 0, + none = 0, v2 = 1 << 0, v3 = 1 << 1, header64 = 1 << 2, diff --git a/include/xsk/gsc/common/types.hpp b/include/xsk/gsc/common/types.hpp index 896b903f..4544caf5 100644 --- a/include/xsk/gsc/common/types.hpp +++ b/include/xsk/gsc/common/types.hpp @@ -29,10 +29,9 @@ enum class instance : u8 enum class build : u8 { - prod = 0 << 0, + prod = 0, dev_blocks = 1 << 0, dev_maps = 1 << 1, - dev = dev_blocks | dev_maps, }; @@ -72,7 +71,7 @@ struct props { enum values : u32 { - none = 0 << 0, + none = 0, str4 = 1 << 0, // strings size 4 tok4 = 1 << 1, // tokenid size 4 waitframe = 1 << 2, // waitframe opcode diff --git a/src/arc/common/ast.cpp b/src/arc/common/ast.cpp index 9faacbea..0790f324 100644 --- a/src/arc/common/ast.cpp +++ b/src/arc/common/ast.cpp @@ -104,7 +104,6 @@ auto node::is_boolean() -> bool default: return false; } - return false; default: return false; } diff --git a/src/tool/main.cpp b/src/tool/main.cpp index 1bcd5833..d142817f 100644 --- a/src/tool/main.cpp +++ b/src/tool/main.cpp @@ -1105,7 +1105,7 @@ auto main(u32 argc, char** argv) -> result ("g,game", "[REQUIRED] one of: iw5, iw6, iw7, iw8, iw9, s1, s2, s4, h1, h2, t6, t7, t8, t9", cxxopts::value(), "") ("s,system", "[REQUIRED] one of: pc, ps3, ps4, ps5, xb2 (360), xb3 (One), xb4 (Series X|S), wiiu", cxxopts::value(), "") ("p,path", "File or directory to process.", cxxopts::value()) - ("d,dev", "Enable developer mode (generate bytecode map).", cxxopts::value()->implicit_value("true")) + ("d,dev", "Enable developer mode (dev blocks & generate bytecode map).", cxxopts::value()->implicit_value("true")) ("z,zonetool", "Enable zonetool mode (use .cgsc files).", cxxopts::value()->implicit_value("true")) ("h,help", "Display help.") ("v,version", "Display version.");