0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Luacheckの設定ファイルの書き方

Posted at

.luacheckrcファイル

vim(ALE)から呼ぶ場合はHomeディレクトリに、ターミナルから使うときはソースのあるディレクトリに.luacheckrcが必要(シンボリックリンクを使う)

luacheckrc.lua
color = false
cache = true
std = 'max+love+busted'
globals = {'PROJECTNAME', 'VERSION', 'idiv', 'gr' ,'inspect', 'pp'}
-- self = false
max_line_length = false
max_code_line_length  = false
-- max_cyclomatic_complexity = 10
ignore = {'122', '142', '143', '211/_', '212/self', '213/_[ij]', '214/_u[%x_u]', '232/dt', '311/_continue_.*', '431/self', '432/self'}

ignore(警告を出さなくする)の設定

パターン(正規表現)を後ろにつけて当てはまるものだけ警告を出さないようにできる

  • 122: mathやloveなどに対して追加で識別子を定める

  • 142: ioなどに対して追加で識別子を定める

  • 143: 142で定めたものを使う

  • 212: 使っていない引数(ただしselfという名前のみ)を警告しない

  • 214: 『アンダースコアで始まる変数名を使っている』という警告をださない(ただしyueがUnicode識別子を変換したもののみ)

  • 311: 『セットした値が使われない』という警告を出さない(ただしyueが生成する_continue_0などのみ)

  • 431: 『同じ名前の変数名でより外側のスコープの変数を覆い隠す』という警告を出さない(ただしyueが生成するselfのみ)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?