Skip to content

OdooParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/parsers/backend/odoo.parser.ts

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(_config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
nameany
versionany
supportedPatternsany

Where it refuses work

  • OdooParser stops the work with an early return when !/\.py$/.test(normalized).
  • OdooParser stops the work with an early return when /(^|\/)(__pycache__|node_modules|\.venv|venv|site-packages)\//.test(normalized).
  • OdooParser stops the work with an early return when /(^|\/)tests?\//.test(normalized) || /(^|\/)test_[^/]*\.py$/.test(normalized).
  • OdooParser stops the work with an early return when cached !== undefined.
  • OdooParser stops the work with an early return when !isOdooControllerSource(source).

When something fails

  • OdooParser handles failure in 2 places: it logs it and continues in 1, and turns it into a return value in 1.

Was this page helpful?

Download as PDF