mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
workflow - fix hemtt lint, drop sqflint, fix ext clippy warnings (#10219)
This commit is contained in:
parent
b72ce6180a
commit
1b210d80a7
9
.github/workflows/arma.yml
vendored
9
.github/workflows/arma.yml
vendored
@ -27,15 +27,6 @@ jobs:
|
||||
- name: Validate function headers
|
||||
run: python3 docs/tools/document_functions.py --debug
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the source code
|
||||
uses: actions/checkout@v4
|
||||
- name: Lint (sqflint)
|
||||
uses: arma-actions/sqflint@master
|
||||
continue-on-error: true # No failure due to many false-positives
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
4
.github/workflows/hemtt.yml
vendored
4
.github/workflows/hemtt.yml
vendored
@ -33,8 +33,8 @@ jobs:
|
||||
xcopy /e /h /q pullrequest\addons addons\
|
||||
xcopy /e /h /q pullrequest\optionals optionals\
|
||||
xcopy /e /h /q pullrequest\include include\
|
||||
xcopy /e /h /q pullrequest\ace.dll ace.dll
|
||||
xcopy /e /h /q pullrequest\ace_x64.dll ace_x64.dll
|
||||
xcopy /y /h /q pullrequest\ace.dll ace.dll
|
||||
xcopy /y /h /q pullrequest\ace_x64.dll ace_x64.dll
|
||||
- name: Run HEMTT build
|
||||
run: hemtt build
|
||||
- name: Rename build folder
|
||||
|
@ -1,5 +1,5 @@
|
||||
fn main() {
|
||||
let repo = git2::Repository::open("../").expect("Open git repo");
|
||||
if let Ok(repo) = git2::Repository::open("../") {
|
||||
let head = repo
|
||||
.head()
|
||||
.expect("Get HEAD")
|
||||
@ -7,4 +7,7 @@ fn main() {
|
||||
.expect("Get HEAD target");
|
||||
let commit = repo.find_commit(head).expect("Find commit");
|
||||
println!("cargo:rustc-env=GIT_HASH={}", commit.id());
|
||||
} else {
|
||||
println!("cargo:rustc-env=GIT_HASH=GIT_REPO_FAILURE");
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct Map {
|
||||
heights: Vec<i64>,
|
||||
building_nums: Vec<i64>,
|
||||
surface_is_water: Vec<bool>,
|
||||
size: u32,
|
||||
size: u32, // unused
|
||||
grids: u32,
|
||||
}
|
||||
|
||||
@ -56,6 +57,7 @@ impl Map {
|
||||
self.surface_is_water[index] = is_water;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[must_use]
|
||||
pub const fn size(&self) -> u32 {
|
||||
self.size
|
||||
|
@ -28,6 +28,7 @@ impl Temperature {
|
||||
self.0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn as_fahrenheit(self) -> f64 {
|
||||
(self.0 - 273.15) * 9.0 / 5.0 + 32.0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user