Skip to content

Fix inconsistent function naming#2454

Open
Suresh-Krishna-P wants to merge 5 commits intoOWASP:masterfrom
Suresh-Krishna-P:func_name
Open

Fix inconsistent function naming#2454
Suresh-Krishna-P wants to merge 5 commits intoOWASP:masterfrom
Suresh-Krishna-P:func_name

Conversation

@Suresh-Krishna-P
Copy link
Contributor

Successfully fixed naming inconsistencies in the OWASP Cornucopia Python scripts. Here's a summary of the changes made:

Closes: #2400

Files Modified:

  1. scripts/convert.py - Main conversion script
  2. scripts/check_translations.py - Translation checker
  3. scripts/convert_asvs.py - ASVS converter
  4. scripts/convert_capec.py - CAPEC converter

Changes Made:

1. Function and Variable Naming

  • Before: Mixed naming styles (some snake_case, some inconsistent)

  • After: Consistent snake_case throughout all files

2. Docstring and Comment Style

  • Before: Inconsistent docstring styles and comment formats
  • After: Consistent docstring format using triple quotes with clear descriptions
  • Added proper docstrings to all functions explaining their purpose
  • Standardized comment style for better readability

3. Function Documentation

  • Added descriptive docstrings to all functions

  • Examples:

    • check_fix_file_extension() - "Fix file extension if missing or incorrect."
    • create_level_summary() - "Create summary page for a specific ASVS level."
    • extract_tags() - "Extract T0xxx tags and their text from a YAML file."

4. Code Organization

  • Maintained existing functionality while improving readability
  • Preserved all original logic and behavior
  • Enhanced code clarity through consistent naming

Verification:

  • All modified files pass Python syntax compilation
  • No breaking changes introduced
  • Code maintains backward compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Inconsistent Function Naming

1 participant