Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow - fix hemtt lint, drop sqflint, fix ext clippy warnings #10219

Merged
merged 10 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hemtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 11 additions & 8 deletions extension/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
fn main() {
let repo = git2::Repository::open("../").expect("Open git repo");
let head = repo
.head()
.expect("Get HEAD")
.target()
.expect("Get HEAD target");
let commit = repo.find_commit(head).expect("Find commit");
println!("cargo:rustc-env=GIT_HASH={}", commit.id());
if let Ok(repo) = git2::Repository::open("../") {
let head = repo
.head()
.expect("Get HEAD")
.target()
.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");
}
}
4 changes: 3 additions & 1 deletion extension/src/ballistics/map/model.rs
Original file line number Diff line number Diff line change
@@ -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,
}

Expand Down Expand Up @@ -56,6 +57,7 @@ impl Map {
self.surface_is_water[index] = is_water;
}

#[allow(dead_code)]
#[must_use]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the #[must_use]?

pub const fn size(&self) -> u32 {
self.size
Expand Down
1 change: 1 addition & 0 deletions extension/src/common/types/temperature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading