excessive-visibility misses test calls on a literal, a void or a local bound to another expression
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read src/main/resources/org/eolang/lints/design/excessive-visibility.xsl and follow how $used matches test-call bases, comparing folded calls with postfix calls. Check existing lint tests for these receiver forms, then add coverage for literal, void, and locally bound receivers. Done means calls whose attribute name is the last segment or the segment before a further dispatch count as references, and the false reports are gone.
索引モデルが issue の本文から書いたものです。
説明
excessive-visibility in src/main/resources/org/eolang/lints/design/excessive-visibility.xsl accepts a test that chains a dotted call onto any expression, such as (phrase "x").multi-words, whatever the receiver is. The parser gives that a .multi-words base, and $used matches it by the attribute name alone. When the receiver is a plain name instead of an expression, the parser folds the call into the base, and the lint then wants the receiver to be the object itself, or a local bound to the object's @loc (#1799). Calls on any other receiver are missed, so these reports from eo-runtime are false, because each method has a test:
# bool.eo, reported: The attribute "or" is public, but no unit test refers to it
true.or false ++> can-disjoin-true-with-false
# chunk.eo, reported for "put" and "get"
eq. ++> can-put-and-get
malloc.of
8
seq * > [c]
c.put 42
c.get
42.as-bytes
# directory.eo, reported for "retried"
mktemp.tmpfile.deleted.as-path.as-dir.made > parent
...
parent.retried
parent.path
42
The bases are Φ.true.or, ξ.v🌵c.put, ξ.v🌵c.get and ξ.parent.retried. true decorates bool, c is a void, and parent is bound to a dispatch chain, so none of them is Φ.bool, Φ.chunk or Φ.directory by name. file.path is reported the same way through ξ.temp.path.
The fix is to treat a folded call the way the lint already treats the postfix one. A base in a test whose last segment, or the segment before a further dispatch, is the attribute name should count as a reference whatever comes before it. The lint is already that lenient with (expr).name, so this only removes the difference between two spellings of the same call.
- 主要言語
- Java
- スター
- 14
- フォーク
- 43
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 166
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
objectionary/lints のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
objectionary/lints#1871 ·
メンテナーはふだん 1 日以内に返信
-
`unlint-non-existing-defect` benchmark lacks coverage for documents with `+unlint` metas, potentially missing regressions対応中かも @VasilevNStas が 100 日前に担当しました。 オープンenhancement good-title
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
objectionary/lints#1284 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
composite @base attributes must be mandatory, if possible対応中かも @Marat-Tim が 583 日前に担当しました。 オープンenhancement good first issue help wanted
objectionary/lints#256 · コメント 12 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
`@pos` may not be larger than the amount of characters in the line再び着手できるかも @h1alexbel が 694 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement good first issue help wanted
objectionary/lints#120 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
embed list of lints into the README file on every push to master再び着手できるかも @Marat-Tim が 718 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement good first issue help wanted
objectionary/lints#65 · コメント 13 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
objectionary/lints の issue をすべて見る
似ている issue
-
Android Bug Core Drape
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
organicmaps/organicmaps#14449 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openhab/openhab-addons#22512 ·
メンテナーはふだん 1 日以内に返信
-
help wanted maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/maven-war-plugin#694 ·
メンテナーはふだん 1 日以内に返信
-
help wanted maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/maven-resolver-ant-tasks#219 ·
メンテナーはふだん 1 日以内に返信
-
help wanted maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/maven-project-info-reports-plugin#704 ·
メンテナーはふだん 1 日以内に返信