Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compile command handling #82

Merged
merged 7 commits into from
Mar 19, 2024
Merged

Commits on Mar 18, 2024

  1. Add function to check if a path is a source file

    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    27c953a View commit details
    Browse the repository at this point in the history
  2. Add tests for is_source_file function

    - Test that strings are handled correctly.
    - Test that Paths are handled correctly.
    - Test for TypeError if argument is not a string or Path.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    667caf7 View commit details
    Browse the repository at this point in the history
  3. Add CompileCommand class

    Represents a single compile command from a compilation database.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    e4ca7a9 View commit details
    Browse the repository at this point in the history
  4. Rewrite load_database to use CompileCommand

    More refactoring is possible here, but deferred until 2.0.0.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    322b798 View commit details
    Browse the repository at this point in the history
  5. Add tests for CompileCommand class

    - Test that command and arguments fields are handled correctly.
    - Test that we can identify which commands we can/should emulate.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    79ed385 View commit details
    Browse the repository at this point in the history
  6. Switch to allowlist for supported compile commands

    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    7fba427 View commit details
    Browse the repository at this point in the history
  7. Use get to simplify handling of default values

    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    cef6ec5 View commit details
    Browse the repository at this point in the history