-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Some source files have no documentation #952
Comments
@Beliavsky if you look at the original code https://github.com/fortran-lang/stdlib/blob/master/src/stdlib_stats_corr.fypp It has not documentation. |
Maybe there should be a rule that no new .fypp or .f90 source file should be committed if it lacks comments. Excluding the source code in the
A Python script to find such files is import os
# Set variables (you can modify these)
extension = '.f90'
search_string = '!'
output_file = 'file_list.txt'
# Function to check if file contains the search string
def contains_string(file_path, search_str):
try:
with open(file_path, 'r', encoding='utf-8') as file:
return search_str in file.read()
except (IOError, UnicodeDecodeError):
# Skip files that can't be read (binary files or permission issues)
return False
# Collect matching files
matching_files = []
for root, dirs, files in os.walk('.'):
for file in files:
if file.endswith(extension):
full_path = os.path.abspath(os.path.join(root, file))
if not contains_string(full_path, search_string):
matching_files.append(full_path)
# Write results to output file
with open(output_file, 'w', encoding='utf-8') as f:
for file_path in matching_files:
f.write(f"{file_path}\n")
print(f"List created in {output_file}")
print(f"Full paths of {extension} files without '{search_string}' have been saved.") |
Some of the Fortran sources have no comments, for example https://github.com/fortran-lang/stdlib/blob/stdlib-fpm/src/stdlib_stats_corr.f90. I think this was auto-generated with fypp. Does that preclude it from having comments?
The text was updated successfully, but these errors were encountered: