Comments (8)
I've added this feature and pushed it to the Github repository. I don't plan to put out a new release for it (yet) though, as I'd prefer to have more than just one new feature before I do that (some bugfixes at least). The command-line syntax is -w or --warn to produce the warning messages. Alternatively, placing "warn: " in your project meta-data will do the same thing, so long as some character follows the colon. Unfortunately, there is no easy way to allow it to provide a line number (sorry about that, I realize it would have been useful). Maybe a feature for some other time.
from ford.
Great Chris.
Don't worry about line number, the warn on name of entity is enough! I will try it late in the morning. Thanks.
from ford.
Just tested... works great! But there is something that is not well documented...
Let us consider IR_Precision module. The latest ford in warn mode tell me
...
Warning: Undocumented variable MinR16P in file IR_Precision.f90
...
As you can see here the variable is really not documented by Ford, but it has its "own" docstring, see this line 98.
I guess that the problem is due to my bad attitude to use one docstring for more than one variables (that are grouped being similar in some ways). As a matter of fact, line 98 defines two variables, namely MinR16P
and MaxR16P
, but the docstring is associated only to the last defined variable.
I suppose that it is very difficult to allow many variables sharing the same docstring, this is just a remainder.
Thank you very much for great work.
from ford.
This is intended behaviour. When multiple variables are declared on one
line (including the case when line continuations are used), only the
last one will have any documentation associated with it. Other
autodocumentation software seems to have similar behaviour. I must say
that I never really anticipated having one docstring associated with two
separate variables. I don't intend to change this, as it would entail
breaking the API.
On 27/01/15 06:41 AM, Stefano Zaghi wrote:
Just tested... works great! But there is something that is not well
documented...Let us consider IR_Precision module. The latest ford in warn mode tell me
...
Warning: Undocumented variable MinR16Pin file IR_Precision.f90
...As you can see here
http://szaghi.github.io/IR_Precision/module/ir_precision.html#var-MinR16P
the variable is really not documented by Ford, but it has its "own"
docstring, see this
https://github.com/szaghi/IR_Precision/blob/master/src/IR_Precision.f90
line 98.I guess that the problem is due to my bad attitude to use one
docstring for more than one variables (that are grouped being similar
in some ways). As a matter of fact, line 98 defines two variables,
namely |MinR16P| and |MaxR16P|, but the docstring is associated only
to the last defined variable.I suppose that it is very difficult to allow many variables sharing
the same docstring, this is just a remainder.Thank you very much for great work.
—
Reply to this email directly or view it on GitHub
https://github.com/cmacmackin/ford/issues/25#issuecomment-71624778.
Chris MacMackin
Saint Mary's University
Curriculum Vitae http://ap.smu.ca/%7Ecmacmack/CV.pdf
from ford.
Sure, I agree with you.
This is just a remark for eventual, future improvement.
Thank you again.
from ford.
Hi Chris,
I have found a possible "false" positive warning.
In FLAP the type bound procedures (e.g. free or check) have their own docstring (e.g. see free one). However, Ford complains with them giving me:
|stefano@zaghi|0|02:26 PM Tue Jan 27|
|~/fortran/FLAP|10 files, 92Kb|
|->~/python/ford/ford.py -w doc/main_page.md
Reading file ./src/IR_Precision.f90
Reading file ./src/flap_test.f90
Reading file ./src/Lib_Strings.f90
Reading file ./src/Data_Type_Command_Line_Interface.f90
Reading file ./src/Lib_IO_Misc.f90
Warning: Undocumented boundprocedure free in file Data_Type_Command_Line_Interface.f90
Warning: Undocumented boundprocedure check in file Data_Type_Command_Line_Interface.f90
...
Have I done a mistake in documenting the type bound procedure, line 701?
from ford.
Okay, this is actually fairly subtle. For bound procedures and module
procedures there are effectively two layers of documentation. One is in
the procedure itself, while the other is where the bound/module
procedure is declared as such. The warning message is complaining that
you haven't documented the latter case.
On 27/01/15 09:36 AM, Stefano Zaghi wrote:
Hi Chris,
I have found a possible "false" positive warning.
In FLAP the type bound procedures
http://szaghi.github.io/FLAP/type/type_command_line_interface.html
(e.g. free or check) have their own docstring (e.g. see free
http://szaghi.github.io/FLAP/proc/free.html one). However, Ford
complains with them giving me:|stefano@zaghi|0|02:26 PM Tue Jan 27|
|/fortran/FLAP|10 files, 92Kb|/python/ford/ford.py -w doc/main_page.md
|->
Reading file ./src/IR_Precision.f90
Reading file ./src/flap_test.f90
Reading file ./src/Lib_Strings.f90
Reading file ./src/Data_Type_Command_Line_Interface.f90
Reading file ./src/Lib_IO_Misc.f90Warning: Undocumented boundprocedure freein file Data_Type_Command_Line_Interface.f90
Warning: Undocumented boundprocedure checkin file Data_Type_Command_Line_Interface.f90
...Have I done a mistake in documenting the type bound procedure
https://github.com/szaghi/FLAP/blob/master/src/Data_Type_Command_Line_Interface.f90,
line 701?—
Reply to this email directly or view it on GitHub
https://github.com/cmacmackin/ford/issues/25#issuecomment-71648139.
Chris MacMackin
Saint Mary's University
Curriculum Vitae http://ap.smu.ca/%7Ecmacmack/CV.pdf
from ford.
Ok, now it is more clear.
The warnings disappear if the type bound procedure have their own docstrings also into the contains
specification.
Thank you Chris.
from ford.
Related Issues (20)
- Derived type extension of an abstract derived type HOT 3
- Ford crashes if a generic binding references a procedure binding that lacks a double colon HOT 1
- Support name attribute for BIND HOT 1
- Abstract method info displayed instead of concrete method info HOT 1
- Problems with public methods in derived type HOT 2
- |media| pointing to wrong directory HOT 5
- Recognize procedure pointer assignments
- RecursionError: maximum recursion depth exceeded while calling a Python object HOT 8
- [Bug] Encoding in the project file (`FORD.md`) does not take effect in the page file (`index.md`, etc) HOT 2
- Having too many items in navbar causes navbar to overlap with content HOT 1
- RuntimeError: 'str object' has no attribute 'meta' HOT 2
- Resolving links in submodules HOT 2
- Inadvertent metadata autodoc comment HOT 1
- Footnotes not recognized HOT 1
- Call-graph ramifications of the FORD type-bound procedures public/private policy HOT 2
- New admonitions bugs
- Catch unresolved names in `correlate`
- Links to variables should be looked in the context of their parent
- Using external option from GitHub Actions script HOT 1
- Nested link for intrinsic `iso_fortran_env` module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ford.