Skip to content
Back to skills

Warning

ASecurity

Do not disable GHC or hlint warnings. Suppress them only per module with OPTIONS_GHC or annotations for justified exceptions. Use when writing or reviewing Haskell code, cabal files, or hlint configuration that disables warnings.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
data-aigitapi

Works with

  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add ncaq/konoka --skill warning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Warning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Warning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ncaq-warning/badge)](https://www.skillsdirectory.com/skills/ncaq-warning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: warning
description: Do not disable GHC or hlint warnings. Suppress them only per module with OPTIONS_GHC or annotations for justified exceptions. Use when writing or reviewing Haskell code, cabal files, or hlint configuration that disables warnings.
user-invocable: false
---

# 警告を無効にしない

## GHCの警告は無効にしない

GHCの警告を無効にすることは原則禁止します。

### 例外

正当な理由がある場合は、
特定の警告を無効にすることを許可します。

cabalなどのプロジェクトファイルを編集するのではなく、
モジュール単位でアノテーションコメントを書いて無効化してください。

そのモジュールのコードが多い場合は、
警告と干渉するコードを別モジュールに切り出すことも検討してください。

#### 孤立インスタンス

孤立インスタンスを定義する場合は許可します。

以下のように無効化してください。

```haskell
{-# OPTIONS_GHC -Wno-orphans #-}
```

ただし孤立インスタンスの定義自体をなるべく避けるべきなので、
設計上どうしても仕方がないときだけにしてください。

#### Template Haskellで避けられない警告

Template Haskellを利用したコード生成で、
こちらから制御できない変数名のshadowingや、
未使用の束縛が発生する場合も、
無効にすることを許可します。

以下のように無効化してください。

```haskell
{-# OPTIONS_GHC -Wno-shadowed-variables #-}
{-# OPTIONS_GHC -Wno-unused-binds #-}
```

## hlintの警告は無効にしない

[hlint](https://github.com/ndmitchell/hlint)の警告を無効にすることは原則禁止します。

### 例外

正当な理由がある場合は、
特定の警告を無効にすることを許可します。

hlintのルールファイルを編集するのではなく、
モジュール単位でアノテーションコメントを書いて無効化してください。

そのモジュールのコードが多い場合は、
警告と干渉するコードを別モジュールに切り出すことも検討してください。

#### その方法でしか書けない場合

ライブラリのAPIがhlintの警告とどうしても干渉してしまう場合などは、
無効にすることを許可します。

#### hlintのバグ

hlintのissueやPRを確認して、
バグであると判断した場合は無効にしても構いません。

まだ報告されていない場合も、
最小限の再現コードで確認して、
明らかに挙動がおかしいと判断した場合は無効にしても構いません。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.