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

The external_parent_case config linter identifies a class definition as its own parent. #857

Open
BigBattleBoy opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@BigBattleBoy
Copy link

Tools (complete and add to the following information):

  • HEMTT: 1.14.1
  • Operating System: Windows

Description:
The external_parent_case config linter is identifying a class definition as its own parent, which results in the config linter missing some errors and misidentifying others.

Steps to reproduce:

  1. Include the following in a config.cpp:
class A {
        class B {
        };
};

class A1 : A {
        class b : B {
        };
};
  1. Run "hemtt.exe dev"

Expected behavior:
The config should build without error, as the child class 'b' correctly identifies the parent class 'B' with the correct letter case.

Logs:

PS E:\arma_dev\test> hemtt.exe dev
 INFO Config loaded for Test 1.0.0.0
 INFO Creating `dev` version
 INFO Compiled 0 sqf files
 INFO Rapified 1 addon configs
error[L-C05]: parent case does not match parent definition
   ┌─ addons/main/config.cpp:14:12
   │
14 │     class b : B {
   │           -   ^ parent does not match definition case
   │           │
   │           parent definition here
   │
   = help: change the parent case to match the parent definition
   = try: b


error[L-C05]: parent case does not match parent definition
   ┌─ addons/main/config.cpp:14:12
   │
14 │     class b : B {
   │           -   ^ parent does not match definition case
   │           │
   │           parent definition here
   │
   = help: change the parent case to match the parent definition
   = try: b

Additional context:
If the config is changed to

class A {
        class B {
        };
};

class A1 : A {
        class b : b {
        };
};

then the linter incorrectly misses the case error.

@BigBattleBoy BigBattleBoy added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant