class AnalyzerDjango

Defined in:

analyzer/analyzers/analyzer_django.cr

Constant Summary

REGEX_INCLUDE_URLS = /include\s*\(\s*r?['"]([^'"\\]*)['"]/
REGEX_ROOT_URLCONF = /\s*ROOT_URLCONF\s*=\s*r?['"]([^'"\\]*)['"]/
REGEX_URL_MAPPING = /[url|path|register]\s*\(\s*r?['"]([^'"\\]*)['"]\s*,\s*(.*)\s*\)/
REGEX_URL_PATTERNS = /urlpatterns\s*=\s*\[(.*)\]/m

Instance Method Summary

Instance methods inherited from class Analyzer

analyze analyze, base_path : String base_path, logger : NoirLogger logger, result : Array(Endpoint) result, scope : String scope, url : String url

Constructor methods inherited from class Analyzer

new(options : Hash(Symbol, String)) new

Macros inherited from class Analyzer

define_getter_methods(names) define_getter_methods

Instance Method Detail

def analyze #

[View source]
def get_endpoints(django_urls : DjangoUrls) : Array(Endpoint) #

[View source]
def get_paths(django_urls : DjangoUrls) #

[View source]
def mapping_to_path(content : String, prefix : String = "") #

[View source]
def search_root_django_urls_list : Array(DjangoUrls) #

[View source]