Skip to content
Snippets Groups Projects
  1. Nov 24, 2017
    • Marek Vavruša's avatar
      modules/predict: cleaned up unused function, variables, trailing whitespace · 1ea9ebce
      Marek Vavruša authored
      The `stats` module is now also included if not exists.
      
      ```
      $ luacheck modules/predict
      Checking modules/predict/predict.lua              OK
      
      Total: 0 warnings / 0 errors in 1 file
      ```
      1ea9ebce
    • Marek Vavruša's avatar
      tests: fixed config tests locking up on error, added test for predict · 52d4f519
      Marek Vavruša authored
      The config tests locked up on error as if error was raised from the
      event callback, it would never reach the `quit()` statement, so
      server would never close on error.
      
      Added a script to make running these types of tests a little bit nicer
      and to allow concurrent execution of config tests.
      
      Added a test for the predict module, that fails on prediction
      of unknown types:
      
      ```
      error: /usr/local/lib/kdns_modules/predict.lua:34: 'struct rr_type' has no member named 'TYPE65535'
      ```
      52d4f519
  2. Nov 23, 2017
    • Petr Špaček's avatar
      Merge branch 'add-lua-linter' into 'master' · f60e0a53
      Petr Špaček authored
      Added luacheck for linting Lua files and static analysis
      
      See merge request !398
      f60e0a53
    • Marek Vavruša's avatar
      Added luacheck for linting Lua files and static analysis · 0e2ffb5d
      Marek Vavruša authored
      This is super useful for checking things like misusing undefined
      variables or modifying globals, especially in modules when it's
      not immediately visible which variables are in the global
      namespace and which are not.
      
      I added several exceptions for files in daemon/lua and tests,
      as for example sandbox module needs to legitimately modify
      global namespace.
      
      There's a lot of things failing, so I didn't make it part of the
      standard `make check`, but we should eventually enable it to
      improve code quality and spot problems with CI.
      0e2ffb5d
  3. Nov 20, 2017
  4. Nov 16, 2017
  5. Nov 15, 2017
  6. Nov 13, 2017
  7. Nov 06, 2017
  8. Nov 02, 2017
  9. Nov 01, 2017
  10. Oct 24, 2017
  11. Oct 20, 2017