mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8221 from ethereum/structured-docs-error-locations
[parser] Source locations for structured documentation errors
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
Error: Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
--> structured_documentation_source_location/input.sol:3:5:
|
||||
|
|
||||
3 | /// @param id Some identifier
|
||||
| ^ (Relevant source part starts here and spans across multiple lines).
|
||||
|
||||
Error: Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
--> structured_documentation_source_location/input.sol:7:5:
|
||||
|
|
||||
7 | /// @return No value returned
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
+5
-3
@@ -1,7 +1,9 @@
|
||||
pragma solidity >= 0.0;
|
||||
abstract contract C {
|
||||
/// @param id Some identifier
|
||||
/// @return No value returned
|
||||
function vote(uint id) public virtual returns (uint value);
|
||||
}
|
||||
// ----
|
||||
// DocstringParsingError: Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
|
||||
/// @return No value returned
|
||||
function unvote(uint id) public virtual returns (uint value);
|
||||
}
|
||||
+1
-1
@@ -4,4 +4,4 @@ abstract contract C {
|
||||
function vote(uint id) public virtual returns (uint value);
|
||||
}
|
||||
// ----
|
||||
// DocstringParsingError: Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
// DocstringParsingError: (26-89): Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
@@ -7,5 +7,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DocstringParsingError: Documented parameter "" not found in the parameter list of the function.
|
||||
// DocstringParsingError: Documented parameter "_" not found in the parameter list of the function.
|
||||
// DocstringParsingError: (17-101): Documented parameter "" not found in the parameter list of the function.
|
||||
// DocstringParsingError: (17-101): Documented parameter "_" not found in the parameter list of the function.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
abstract contract C {
|
||||
/// @param id Some identifier
|
||||
/// @return No value returned
|
||||
function vote(uint id) public virtual returns (uint value);
|
||||
|
||||
/// @return No value returned
|
||||
function unvote(uint id) public virtual returns (uint value);
|
||||
}
|
||||
// ----
|
||||
// DocstringParsingError: (26-89): Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
// DocstringParsingError: (159-188): Documentation tag "@return No value returned" does not contain the name of its return parameter.
|
||||
Reference in New Issue
Block a user