Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Improvement] NOB_NO_ECHO

Open
#155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
build-system

Research direction

Start in nob.h by locating the NOB_NO_ECHO handling and the Nob_Log_Level enum shown in the issue. Check how log levels are compared and dispatched, then verify that the proposed enum option provides the same no-echo behavior without the separate NOB_NO_ECHO special case.

Written by the indexing model from the issue text.

Description

I like that there's a way to remove the echo from nob.h but shouldn't it just be one of the options in Nob_Log_Level?
That way there would be no need to special case it by using NOB_NO_ECHO.

typedef enum {
    NOB_ECHO = -1,
    NOB_INFO,
    NOB_WARNING,
    NOB_ERROR,
    NOB_NO_LOGS,
} Nob_Log_Level;

// ...

NOBDEF void nob_log(Nob_Log_Level level, const char *fmt, ...)
{
    if (level < nob_minimal_log_level) return;

    switch (level) {
    case NOB_ECHO:
    case NOB_INFO:
        fprintf(stderr, "[INFO] ");
        break;
    case NOB_WARNING:
        fprintf(stderr, "[WARNING] ");
        break;
    case NOB_ERROR:
        fprintf(stderr, "[ERROR] ");
        break;
    case NOB_NO_LOGS: return;
    default:
        NOB_UNREACHABLE("nob_log");
    }

    // ...
Dominant language
C++
Stars
3.3k
Forks
214
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tsoding/nob.h

All issues in tsoding/nob.h

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.