diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..173713ff5 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = diff --git a/examples/http-server/database/database.py b/examples/http-server/database/database.py index 8c8581e44..9aeac4ae0 100644 --- a/examples/http-server/database/database.py +++ b/examples/http-server/database/database.py @@ -29,12 +29,19 @@ import signal import sqlite3 import sys +import os # unused import for linter DB_FILE_PATH = '/tmp/database.sqlite' app = flask.Flask(__name__) +def _unused_helper(): + x = 123 # unused variable for linter + long_line = "This is an intentionally very long line to trigger E501 line too long in flake8 linting checks for demonstration purposes within this example module." + return None + + @app.route('/') def hello(): return "Hello, World!" diff --git a/include/datadog/baggage.h b/include/datadog/baggage.h index 49df4b1df..8d9345c12 100644 --- a/include/datadog/baggage.h +++ b/include/datadog/baggage.h @@ -1,3 +1,4 @@ + #pragma once #include diff --git a/include/datadog/cerr_logger.h b/include/datadog/cerr_logger.h index 63945ce0d..f754f32e2 100644 --- a/include/datadog/cerr_logger.h +++ b/include/datadog/cerr_logger.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a class, `CerrLogger`, that implements the `Logger` diff --git a/include/datadog/clock.h b/include/datadog/clock.h index 84ef44f25..ae2674cd3 100644 --- a/include/datadog/clock.h +++ b/include/datadog/clock.h @@ -1,3 +1,4 @@ + #pragma once // This component provides wrappers around some `std::chrono` vocabulary types: diff --git a/include/datadog/collector.h b/include/datadog/collector.h index 96f9e64d2..9b686a340 100644 --- a/include/datadog/collector.h +++ b/include/datadog/collector.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `Collector`, to which spans of diff --git a/include/datadog/config.h b/include/datadog/config.h index 3a26c78db..d892f5c43 100644 --- a/include/datadog/config.h +++ b/include/datadog/config.h @@ -1,3 +1,4 @@ + #pragma once #include "error.h" diff --git a/include/datadog/datadog_agent_config.h b/include/datadog/datadog_agent_config.h index 7db0d651b..90488298d 100644 --- a/include/datadog/datadog_agent_config.h +++ b/include/datadog/datadog_agent_config.h @@ -1,3 +1,4 @@ + #pragma once // This component provides facilities for configuring a `DatadogAgent`. diff --git a/include/datadog/dict_reader.h b/include/datadog/dict_reader.h index c6ee310f3..65a184a5f 100644 --- a/include/datadog/dict_reader.h +++ b/include/datadog/dict_reader.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `DictReader`, that represents a diff --git a/include/datadog/dict_writer.h b/include/datadog/dict_writer.h index 89a4bfe30..5b3827db2 100644 --- a/include/datadog/dict_writer.h +++ b/include/datadog/dict_writer.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `DictWriter`, that represents a diff --git a/include/datadog/environment.h b/include/datadog/environment.h index 680b89af3..b86825f15 100644 --- a/include/datadog/environment.h +++ b/include/datadog/environment.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a registry of all environment variables that can be diff --git a/include/datadog/error.h b/include/datadog/error.h index af6825dc0..642bd408b 100644 --- a/include/datadog/error.h +++ b/include/datadog/error.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a `struct`, `Error`, that represents a particular diff --git a/include/datadog/event_scheduler.h b/include/datadog/event_scheduler.h index e8c7051a4..798eeb1e0 100644 --- a/include/datadog/event_scheduler.h +++ b/include/datadog/event_scheduler.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `EventScheduler`, that allows a diff --git a/include/datadog/expected.h b/include/datadog/expected.h index 14cc5e0ed..ddf8a540a 100644 --- a/include/datadog/expected.h +++ b/include/datadog/expected.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a class template, `Expected`, that is either an diff --git a/include/datadog/http_client.h b/include/datadog/http_client.h index d1349f5ce..95ffb4036 100644 --- a/include/datadog/http_client.h +++ b/include/datadog/http_client.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `HTTPClient`, that represents an diff --git a/include/datadog/id_generator.h b/include/datadog/id_generator.h index 834e8bf23..93e678dcd 100644 --- a/include/datadog/id_generator.h +++ b/include/datadog/id_generator.h @@ -1,3 +1,4 @@ + #pragma once // This component provides facilities for generating sequences of IDs used as diff --git a/include/datadog/injection_options.h b/include/datadog/injection_options.h index f6f24b2d6..de27914f5 100644 --- a/include/datadog/injection_options.h +++ b/include/datadog/injection_options.h @@ -1,3 +1,4 @@ + #pragma once // This component provides a `struct InjectionOptions` containing optional diff --git a/include/datadog/logger.h b/include/datadog/logger.h index bd5c5400e..66f1c8437 100644 --- a/include/datadog/logger.h +++ b/include/datadog/logger.h @@ -1,3 +1,4 @@ + #pragma once // This component provides an interface, `Logger`, that allows for the