Skip to main content

name-boolean-flags-affirmatively

When naming a boolean variable, parameter or attribute, phrase it affirmatively

소스 정보

저장소
samugit83/cortex
최근 소스 활동
2026년 9월 20일 20:32
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
name-boolean-flags-affirmatively
description
When naming a boolean variable, parameter or attribute, phrase it affirmatively
# Boolean names A negated name forces the reader to undo the negation at every use. - Prefer `enabled` to `disabled`, `found` to `not_found`, `valid` to `invalid`. - A parameter that switches behaviour off should still be named for what it controls, with `False` as its value, rather than named for the absence. - Predicates that answer a question read best as `is_`, `has_` or `can_` followed by the thing being asked about. The gain is at the call site: `if enabled:` needs no second thought, and `if not disabled:` never quite does.
GitHub에서 보기