- edited description
コード自動整形の導入
Issue #255
resolved
omnisharpとeditorconfigでコードの自動整形が可能なようなので導入する。
https://www.neputa-note.net/2020/10/vscode-editorconfig.html
https://tanabebe.hatenablog.com/entry/2021/04/20/191500
コードスタイルは標準的なc#の作法に準じるが、以下の点を変更する。
- utf8 bomなし
- 改行コード lf
- ファイル末尾改行
- インデントは半角スペース4個
- csv出力は現状のまま変更しない
- NumEquips.csv の出力は改行 lf に変更する
utf8のbom削除はなぜかフォーマッターではできないようなので、エンコード付きで保存を実行する。
c# では max_line_length が効かないようなので、手動でbitbucketでのコード表示幅の限界に近い幅160に合わせる。
また、自動整形の範囲外にはなるが、全ソースの冒頭に apache lisence 2.0 の条項文とコピーライトを追加する。
コピーライトの発行年は初出のみとし、既存のものは変更しない。ファイルごとにgitの履歴から初出年を調べることとする。
.md ファイルはプレビューで改行を修正する。<br>で手動改行が可能。
ファイルを検査するコマンド
find . -type f -not -path "./.git/*" -not -path "./packages/*" -exec file {} \; | grep CRLF
find . -type f -not -path "./.git/*" -not -path "./packages/*" -exec file {} \; | grep extended-ASCII # sjis
find . -type f -not -path "./.git/*" -not -path "./packages/*" -exec file {} \; | grep BOM
Comments (9)
-
reporter -
reporter - edited description
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter -
reporter - changed status to resolved
- Log in to comment