excessive-visibility reports atom record types whose annotation lists field types

オープン 初心者向け
#1,871 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, xml
領域
testing, tooling

調査の方向性

excessive-visibility.xslから始め、変数typesが@atomと@typeの値を収集してから@locと比較する仕組みを調べてください。フィールド型リストを持つatomアノテーションがレコード型名と一致するように、正規化を更新してください。報告されたEOの例に対してexcessive-visibilityのチェックを実行してください。これらのレコードが誤って報告されなくなり、通常のvisibilityチェックも引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

excessive-visibility is meant to leave alone a formation that an atom names as its return type. It collects those names in excessive-visibility.xsl:

<xsl:variable name="types" select="(//o/@atom, for $t in //o/@type return replace($t, '\?$', ''))"/>
...
and not(@loc = $types)

In EO the atom annotation now also lists the types of the record's fields:

[] > readdir /Q.posix.dir-return(Q.number,Q.string)
[cde nme] > dir-return
  posix.dir-return > called

The parser keeps that whole annotation in @atom, as atom="Φ.posix.dir-return(Φ.number,Φ.string)", while the formation's @loc is Φ.posix.dir-return. They never compare equal, so every such record is reported:

posix:41 The attribute "dir-return" is public, but no unit test refers to it; obfuscate it with >> instead of > (excessive-visibility/S)

eo-runtime gets ten of these, dir-return, getenv-return, stat-return and status-return in posix.eo, plus those and search-return and time-return in win32.eo. Following the advice would break the build, since the runtime finds these records through their absolute names.

The type should be cut at the first ( before it is compared, as in replace($t, '\(.*$|\?$', '') applied to @atom as well as to @type.

主要言語
Java
スター
14
フォーク
43
平均マージ
1日 20時間
マージ済み PR(30日)
166

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

objectionary/lints のほかの issue

objectionary/lints の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。