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

Fix helm linting warnings #221

Merged
merged 1 commit into from
Oct 5, 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
28 changes: 20 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
run: python3 tools/config_style_checker.py
- name: Check for BOM
uses: arma-actions/bom-check@master
- name: .editorconfig Checker
uses: editorconfig-checker/action-editorconfig-checker@main
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Check Functions
run: cd tools/nodejs_tools && npm i &> /dev/null && cd ../../ && node tools/nodejs_tools/prepchecker.js

lint:
runs-on: ubuntu-latest
Expand All @@ -27,7 +33,7 @@ jobs:
- name: Lint (sqflint)
uses: jokoho48/sqflint@master
continue-on-error: true # No failure due to many false-positives
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: "sqfLint Log"
path: "sqf.log"
Expand Down Expand Up @@ -55,14 +61,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Setup Node tools
run: cd tools/nodejs_tools && npm i &> /dev/null && cd ../../
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
with:
version: 'v1.10.2'
- name: Set Build Version
run: node tools/nodejs_tools/gitversionsetter.js
- name: Run HEMTT build
run: hemtt release
# - name: Upload Release
# uses: actions/upload-artifact@v4
# with:
# name: my-mod-latest
# path: release/my-mod-latest.zip
- name: Upload Release
uses: actions/upload-artifact@v4
with:
name: "@diwako_dui"
path: ".hemttout/release/*"
4 changes: 2 additions & 2 deletions addons/buddy/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ private _range = 10;
if (isNil "ace_interact_menu_fnc_createAction") then {
[[_labelAdd, {
[player, cursorObject] call FUNC(pairBuddies);
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isNotEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction;
}, [], -5000, false, true, "", format ["cursorObject distance2D player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isNotEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction;

[[_labelRemove, {
[player, cursorObject, false] call FUNC(pairBuddies);
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction;
}, [], -5000, false, true, "", format ["cursorObject distance2D player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction;
} else {
// root
private _action = [QGVAR(buddy_action), _labelAdd, "", {
Expand Down
4 changes: 2 additions & 2 deletions addons/indicators/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ GVAR(drawEh) = -1;
,false
] call CBA_fnc_addSetting;

if (isClass (configfile >> "CfgPatches" >> "ace_nametags")) then {
if (isClass (configFile >> "CfgPatches" >> "ace_nametags")) then {
[
QGVAR(useACENametagsRange)
,"CHECKBOX"
Expand All @@ -106,7 +106,7 @@ private _curCat = localize "STR_dui_cat_icons";
,true
] call CBA_fnc_addSetting;

if (isClass(configfile >> "CfgPatches" >> "diwako_dui_buddy")) then {
if (isClass(configFile >> "CfgPatches" >> "diwako_dui_buddy")) then {
[
QGVAR(icon_buddy)
,"CHECKBOX"
Expand Down
4 changes: 2 additions & 2 deletions addons/indicators/functions/fnc_display.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private _distanceWarning = diwako_dui_distanceWarning;
private _range = [GVAR(range), GVAR(range_crew)] select (GVAR(crew_range_enabled) && { _player call EFUNC(main,isInCrew) });
private _size = GVAR(size);
private _useACE = GVAR(useACENametagsRange);
private _camPosASL = AGLtoASL positionCameraToWorld [0, 0, 0];
private _camPosASL = AGLToASL positionCameraToWorld [0, 0, 0];
private _scaleWithRange = GVAR(range_scale);
if (GVAR(fov_scale)) then {
_size = _size * ((call CBA_fnc_getFov) select 1);
Expand All @@ -30,7 +30,7 @@ private _sizeFinal = 0;
_alpha = _x getVariable [QEGVAR(radar,occlusion_alpha), 1];
if (_alpha > 0) then {
_vehTarget = vehicle _x;
_iconPos = (ASLtoAGL visiblePositionASL _vehTarget) vectorAdd (if (_vehTarget isEqualTo _x) then {
_iconPos = (ASLToAGL visiblePositionASL _vehTarget) vectorAdd (if (_vehTarget isEqualTo _x) then {
[0, 0, 0.2 + ((_x selectionPosition "pelvis") select 2)]
} else {
[0, 0, 0.9]
Expand Down
2 changes: 1 addition & 1 deletion addons/indicators/include/getIndicatorStyles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private _indicatorPaths = [];
private _namespace = [] call CBA_fnc_createNamespace;
private _configName = configName _x;
_indicatorNames pushBack _configName;
_indicatorPaths pushback getText (_x >> "name");
_indicatorPaths pushBack getText (_x >> "name");

_namespace setVariable ["indicator", getText (_x >> "indicator")];
_namespace setVariable ["leader", getText (_x >> "leader")];
Expand Down
4 changes: 2 additions & 2 deletions addons/main/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ GVAR(availableFonts) = [
}
] call CBA_fnc_addSetting;

if (isClass(configfile >> "CfgPatches" >> "ace_interact_menu")) then {
if (isClass(configFile >> "CfgPatches" >> "ace_interact_menu")) then {
[
"diwako_dui_ace_hide_interaction"
,"CHECKBOX"
Expand Down Expand Up @@ -238,7 +238,7 @@ GVAR(radioModSpectator) = configFile call {
[QGVAR(refreshUI),[]] call CBA_fnc_localEvent;
}, true] call CBA_fnc_addPlayerEventHandler;

if (isClass (configfile >> "CfgPatches" >> "ace_nametags")) then {
if (isClass (configFile >> "CfgPatches" >> "ace_nametags")) then {
["CBA_SettingChanged", {
params ["_setting", "_value"];
switch (_setting) do {
Expand Down
4 changes: 2 additions & 2 deletions addons/main/functions/fnc_canHudBeShown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ params ["_player"];
{(_player getVariable ["ace_spectator_isSet", false]) ||
{(_player getVariable ["ACE_isUnconscious", false]) ||
GVAR(radioModSpectator) ||
{_player isKindof "VirtualSpectator_F" ||
{_player isKindOf "VirtualSpectator_F" ||
{GVAR(hide_dialog) && {dialog} ||
{diwako_dui_ace_hide_interaction && {missionNamespace getVariable ["ace_interact_menu_openedMenuType",-1] > -1} ||
{!isnull (missionNamespace getVariable ["ace_arsenal_camera", objNull]) ||
{!isNull (missionNamespace getVariable ["ace_arsenal_camera", objNull]) ||
{GVAR(inFeatureCamera)}}}}}}}}
)
4 changes: 2 additions & 2 deletions addons/main/include/getColorStyles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private _getColorFromHex = {
private _namespace = [] call CBA_fnc_createNamespace;
private _configName = configName _x;
_colorIdent pushBack _configName;
_colorNames pushback getText (_x >> "name");
_colorNames pushBack getText (_x >> "name");

_namespace setVariable ["main", getText (_x >> "white")];
["main", _namespace getVariable "main"] call _getColorFromHex;
Expand Down Expand Up @@ -60,7 +60,7 @@ _namespace setVariable ["yellow", "#FFFF00"];
GVAR(colors_custom) = _namespace;

// ACE name tags support
if (isClass (configfile >> "CfgPatches" >> "ace_nametags")) then {
if (isClass (configFile >> "CfgPatches" >> "ace_nametags")) then {
// ace nametags is also loaded, provide ace nametag colors as well
_namespace = missionNamespace getVariable QGVAR(colors_ace);
if (isNil "_namespace") then {
Expand Down
2 changes: 1 addition & 1 deletion addons/main/include/getIconStyles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ private _iconIdent = [];

{
private _namespace = [] call CBA_fnc_createNamespace;
_iconNames pushback getText (_x >> "name");
_iconNames pushBack getText (_x >> "name");
private _configName = configName _x;
_iconIdent pushBack _configName;

Expand Down
4 changes: 2 additions & 2 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 10
#define PATCHLVL 1
#define MINOR 11
#define PATCHLVL 0
#define BUILD 0
2 changes: 1 addition & 1 deletion addons/nametags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GVAR(targetedFade) = 1;
call FUNC(cacheLoop);

player setVariable [QGVAR(name), name player];
player setVariable [QGVAR(groupName), groupID (group player)];
player setVariable [QGVAR(groupName), groupId (group player)];

// Create UI
([QUOTE(ADDON)] call BIS_fnc_rscLayer) cutRsc [QUOTE(ADDON), "PLAIN", 1, false];
Expand Down
2 changes: 1 addition & 1 deletion addons/nametags/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private _rankNamesHashMap = GVAR(RankNames) get GVAR(rankNameStyle);
{
if (alive _x) then {
_x setVariable [QGVAR(name), _x getVariable [QEGVAR(main,customName), _x getVariable ["ACE_Name", name _x]]];
_x setVariable [QGVAR(groupName), _x getVariable [QGVAR(customGroup), groupID (group _x)]];
_x setVariable [QGVAR(groupName), _x getVariable [QGVAR(customGroup), groupId (group _x)]];
_x setVariable [QGVAR(side), side group _x];
private _rank = rank _x;
private _rankName = _rankNamesHashMap get _rank;
Expand Down
2 changes: 1 addition & 1 deletion addons/nametags/functions/fnc_handleInitPost.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
params ["_unit"];

_unit setVariable [QGVAR(name), name _unit];
_unit setVariable [QGVAR(groupName), groupID group _unit];
_unit setVariable [QGVAR(groupName), groupId group _unit];

private _rank = rank _unit;
private _styledRank = GVAR(RankNames) getOrDefault [_rank, ""];
Expand Down
2 changes: 1 addition & 1 deletion addons/nametags/functions/fnc_onDraw.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if (isNull _target || {!(player call EFUNC(main,canHudBeShown)) || {unitIsUAV _t
_data append ["</t>", "<br/>"];
_data pushBack format [_tags, GVAR(fontGroup), _colorGroup, (GET_POS_H) * GVAR(fontGroupNameSize), GVAR(groupFontShadow)];

_data pushBack (_target getVariable [QGVAR(groupName), groupID (group _target)]);
_data pushBack (_target getVariable [QGVAR(groupName), groupId (group _target)]);
_data append ["</t>", "</t>"];
// TODO(joko): Add Extra Fade for Group?
_ctrl ctrlSetStructuredText parseText (_data joinString "");
Expand Down
2 changes: 1 addition & 1 deletion addons/radar/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if !(isNil "ace_goggles") then {
};
}] call CBA_fnc_addEventHandler;

if (isClass(configfile >> "CfgPatches" >> "ace_finger")) then {
if (isClass(configFile >> "CfgPatches" >> "ace_finger")) then {
["ace_finger_fingered", {
_this call FUNC(incomingFinger);
}] call CBA_fnc_addEventHandler;
Expand Down
14 changes: 7 additions & 7 deletions addons/radar/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private _tfar = isClass (configFile >> "CfgPatches" >> "task_force_radio");
private _acre = isClass (configFile >> "CfgPatches" >> "acre_main");
private _curCat = localize "STR_dui_cat_general";

if !(isClass(configfile >> "CfgPatches" >> "ace_ui")) then {
if !(isClass(configFile >> "CfgPatches" >> "ace_ui")) then {
[
"diwako_dui_show_squadbar"
,"CHECKBOX"
Expand All @@ -44,9 +44,9 @@ if !(isClass(configfile >> "CfgPatches" >> "ace_ui")) then {
,{
params ["_value"];
// disable/enable vanilla squadbar
private _showHud = shownHUD;
_showHud set [6, _value];
showHud (_showHud select [0, 8]);
private _showHUD = shownHUD;
_showHUD set [6, _value];
showHUD (_showHUD select [0, 8]);
}
] call CBA_fnc_addSetting;
};
Expand Down Expand Up @@ -83,7 +83,7 @@ if (_acre || _tfar) then {
GVAR(showSpeaking_replaceIcon) = false;
};

if (isClass (configfile >> "CfgPatches" >> "ace_medical")) then {
if (isClass (configFile >> "CfgPatches" >> "ace_medical")) then {
[
QGVAR(ace_medic)
,"CHECKBOX"
Expand Down Expand Up @@ -386,7 +386,7 @@ private _curCat = localize "STR_dui_cat_compass";
] call CBA_fnc_addSetting;

GVAR(pointers) = [];
if (isClass(configfile >> "CfgPatches" >> "ace_finger")) then {
if (isClass(configFile >> "CfgPatches" >> "ace_finger")) then {
#include "include\getPointerStyles.sqf"
[
QGVAR(ace_finger)
Expand Down Expand Up @@ -462,7 +462,7 @@ private _curCat = localize "STR_dui_cat_namelist";
}
] call CBA_fnc_addSetting;

if (isClass(configfile >> "CfgPatches" >> "diwako_dui_buddy")) then {
if (isClass(configFile >> "CfgPatches" >> "diwako_dui_buddy")) then {
[
"diwako_dui_namelist_only_buddy_icon"
,"CHECKBOX"
Expand Down
8 changes: 4 additions & 4 deletions addons/radar/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (diwako_dui_compass_hide_blip_alone_group && {(count _group) <= 1}) then {
};

if (GVAR(group_by_vehicle)) then {
private _newGrp = _group apply { [objectParent _x, [1,0] select ((driver vehicle _x) isEqualTo _x), _x] };
private _newGrp = _group apply { [objectParent _x, parseNumber !((driver vehicle _x) isEqualTo _x), _x] };
_newGrp sort true;
_newGrp = _newGrp apply { _x select 2 };

Expand Down Expand Up @@ -70,9 +70,9 @@ if (_specialTrack isEqualType [] && {_specialTrack isNotEqualTo []}) then {
private _type = (typeOf _x);
private _picture = _vehNamespace getVariable _type;
if (isNil "_picture") then {
_picture = getText (configfile >> "CfgVehicles" >> _type >> "icon");
if (isText (configfile >> "CfgVehicleIcons" >> _picture)) then {
_picture = getText (configfile >> "CfgVehicleIcons" >> _picture);
_picture = getText (configFile >> "CfgVehicles" >> _type >> "icon");
if (isText (configFile >> "CfgVehicleIcons" >> _picture)) then {
_picture = getText (configFile >> "CfgVehicleIcons" >> _picture);
} else {
private _found = (toLower _picture) find ".paa";
if (_found isEqualTo -1 || {((count _picture) - 4) isNotEqualTo _found}) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/radar/functions/fnc_compassPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if ([_player] call EFUNC(main,canHudBeShown)) then {
_compassCtrl ctrlShow true;
_dirCtrl ctrlShow true;
};
private _camDirVec = positionCameratoWorld [0,0,0] vectorFromTo (positionCameraToWorld [0,0,1]);
private _camDirVec = positionCameraToWorld [0,0,0] vectorFromTo (positionCameraToWorld [0,0,1]);
private _dir = _camDirVec call CBA_fnc_vectDir;
// private _dir = (getCameraViewDirection _player) call CBA_fnc_vectDir;
private _hasCompass = ([_player] call FUNC(getCompass)) isNotEqualTo "";
Expand Down
4 changes: 2 additions & 2 deletions addons/radar/functions/fnc_displayUnitOnCompass.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (GVAR(vehicleCompassEnabled) && { _player call EFUNC(main,isInCrew) }) then {
_unit setVariable ["diwako_dui_unit_id", _unitID];
};

private _distance = (getPosVisual _player) distance2d (getPosVisual _unit);
private _distance = (getPosVisual _player) distance2D (getPosVisual _unit);
private _alpha = 0;
private _relDir = 0;
if (_distance <= _circleRange) then {
Expand Down Expand Up @@ -130,7 +130,7 @@ if (GVAR(vehicleCompassEnabled) && { _player call EFUNC(main,isInCrew) }) then {
_unit setVariable [QGVAR(occlusion_alpha), _occlusionAlpha];
};

_usedCtrls pushback _ctrl;
_usedCtrls pushBack _ctrl;
};
} forEach _grp;

Expand Down
2 changes: 1 addition & 1 deletion addons/radar/include/getCompassStyles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ private _compassNames = [];
private _compassPaths = [];

{
_compassNames pushback getText (_x >> "name");
_compassNames pushBack getText (_x >> "name");
_compassPaths pushBack [getText (_x >> "limited"), getText (_x >> "full")];
} forEach (_configs + _missionConfigs);
2 changes: 1 addition & 1 deletion addons/radar/include/getPointerStyles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ GVAR(pointerPaths) = [] call CBA_fnc_createNamespace;

{
_pointerClasses pushBack (configName _x);
_pointerNames pushback getText (_x >> "name");
_pointerNames pushBack getText (_x >> "name");
GVAR(pointerPaths) setVariable [(configName _x), getText (_x >> "file")];
} forEach (_configs + _missionConfigs);
Loading