awesome-youtubers/linter/lint.py

28 lines
1.2 KiB
Python
Raw Normal View History

2021-02-18 19:15:48 -05:00
from rules.content_about import content_about
2021-02-06 14:47:14 -05:00
2021-02-11 18:24:13 -05:00
2021-02-06 14:47:14 -05:00
def main():
"""
Main function. Used specifically to call print results
by calling functions into rules/.
"""
2021-02-18 19:15:48 -05:00
# if len(youtubers_names.youtubers_name_errors_nums) == 0:
# print("Every YouTubers names are good.", "\n")
# else:
# print("'YouTubers name' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in youtubers_names.youtubers_name_errors_nums]), "\n")
2021-02-11 18:24:13 -05:00
2021-02-18 19:15:48 -05:00
if len(content_about()) == 0:
print("Every 'Content about' sections are good.")
2021-02-06 14:47:14 -05:00
else:
2021-02-18 19:15:48 -05:00
print("There are some errors")
# print("'Content about' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in content_about()]), "\n")
2021-02-06 14:47:14 -05:00
2021-02-18 19:15:48 -05:00
# if len(featured_playlists.featured_playlists_errors_nums) == 0:
# print("Every 'Featured playlists' sections are good.")
# else:
# print("'Featured playlists' errors:\n", '\n'.join(["Error at line {}: there should be a trailing '\\'.".format(i) for i in featured_playlists.featured_playlists_errors_nums]))
2021-02-06 14:47:14 -05:00
2021-02-11 18:24:13 -05:00
2021-02-06 14:47:14 -05:00
if __name__ == '__main__':
main()