Skip to content

Style50 counts header comments as lines of code, but not as comments #76

Description

@Jelleas

This overly commented snippet of code needs more comments according to style50.

/******************************
 *
 * hello.c
 *
 * This script prints "Hello, world! in the terminal window.
 *
 * Created by: (UvA Student)
 *
 ******************************/

// Including needed header file
#include <stdio.h>

// The main function, which will be started automatically.
int main(void)
{
    // Print "Hello, World!" in the terminal window.
    printf("Hello, world!\n");
}
~/workspace/ $ style50 hello.c
Looks good!
But consider adding more comments!

Apparently removing the header comment fixes the issue?

// Including needed header file
#include <stdio.h>

// The main function, which will be started automatically.
int main(void)
{
    // Print "Hello, World!" in the terminal window.
    printf("Hello, world!\n");
}
~/workspace/ $ style50 hello.c
Looks good!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions