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

attributes in long lines #251

Closed
antikostya opened this issue Oct 26, 2021 · 0 comments
Closed

attributes in long lines #251

antikostya opened this issue Oct 26, 2021 · 0 comments

Comments

@antikostya
Copy link

Describe the bug
norminette triggers TOO_FEW_TAB and TOO_MANY_INSTR if
attributes does not fit to one line of function prototype in .c file

Erroneous code

static unsigned long long int	long_name_function(void)
								__attribute__((warn_unused_result))
								__attribute__((__nothrow__));

norminette return

Error: TOO_FEW_TAB          (line:   3, col:  33):	Missing tabs for indent level
Error: TOO_MANY_INSTR       (line:   3, col:  33):	Too many instructions on a single line

and this error keeps to appear with any indentation ammount
even if you add a lot of them:

static unsigned long long int	long_name_function(void)
									...(many tabs)...			__attribute__((warn_unused_result))
									...(many tabs)...			__attribute__((__nothrow__));

norminette return

Error: LINE_TOO_LONG        (line:   2, col:  85):	line too long
Error: LINE_TOO_LONG        (line:   3, col:  85):	line too long
Error: LINE_TOO_LONG        (line:   3, col: 2753):	line too long
Error: TOO_FEW_TAB          (line:   3, col: 2753):	Missing tabs for indent level
Error: TOO_MANY_INSTR       (line:   3, col: 2753):	Too many instructions on a single line

but there is a solution

static unsigned long long int	long_name_function(void) __attribute__((
										warn_unused_result)) __attribute__((
										__nothrow__));

norminette return OK!

Additional infos

  • OS: Linuxmint 20.2 uma
  • python --version: Python 3.8.10
  • norminette -v: norminette 3.3.40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant