-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variables beginning with common problematic? #173
Comments
Indeed, renaming the variable solves the issue. |
I'm having trouble reproducing this. Could you send me a more complete example? |
Attached is a ZIP of project description file and the source file causing the trouble. It won't compile on its own, but the document generation should work fine. If you replace the variable name commonModes by, for example, minModes, the documentation is generated as expected. I am sorry but I also failed in the attempt to create a smaller minimal example to reproduce this. |
Found that my regular expression wasn't being quite picky enough when identifying common blocks. It will be in the next release. |
With FORD 5.0.6 we get an error in our code documentation, which previously did not appear:
Traceback (most recent call last):
File "/usr/bin/ford", line 9, in
load_entry_point('FORD==5.0.6', 'console_scripts', 'ford')()
File "/usr/lib/python3.5/site-packages/ford/init.py", line 357, in run
main(proj_data,proj_docs,md)
File "/usr/lib/python3.5/site-packages/ford/init.py", line 317, in main
project.markdown(md,'..')
File "/usr/lib/python3.5/site-packages/ford/fortran_project.py", line 279, in markdown
src.markdown(md,self)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 435, in markdown
if isinstance(item, FortranBase): item.markdown(md,project)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 435, in markdown
if isinstance(item, FortranBase): item.markdown(md,project)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 435, in markdown
if isinstance(item, FortranBase): item.markdown(md,project)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 385, in markdown
if not isinstance(self,FortranType): sort_items(self,self.variables)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 2366, in sort_items
items.sort(key=permission)
File "/usr/lib/python3.5/site-packages/ford/sourceform.py", line 2337, in permission
if i.permission == 'public': return 'b'
AttributeError: 'str' object has no attribute 'permission'
The sourceline for which this happens seems to be:
commonModes = min(nOrigModes-1, maxdegree+1)
However, sort_items seems to try to sort
Modes = min(nOrigModes-1, maxdegree+1)
Thus, my suspicion that something is broken with the common at the beginning of the variable name.
The text was updated successfully, but these errors were encountered: