원클릭으로
linting-and-style
// Running luacheck for Lua linting and following code style conventions in Edge Driver development
// Running luacheck for Lua linting and following code style conventions in Edge Driver development
Setting up the development environment, deploying Edge Drivers to hubs, and sharing drivers with other users via channels and invites
Running and writing integration tests for SmartThings Edge Drivers using the Python test harness and Lua integration test framework
Understanding the SmartThings Edge Driver Lua libraries - driver lifecycle, message dispatchers, default handlers, and protocol message objects
Understanding and defining SmartThings capabilities, device profiles, preferences, and embedded device configurations for Edge Drivers
| name | linting-and-style |
| description | Running luacheck for Lua linting and following code style conventions in Edge Driver development |
luacheck --config .github/workflows/.luacheckrc <path>
# Lint a specific driver
luacheck --config .github/workflows/.luacheckrc drivers/SmartThings/zigbee-switch/
# Lint a single file
luacheck --config .github/workflows/.luacheckrc drivers/SmartThings/zigbee-switch/src/init.lua
# Lint the entire repo
luacheck --config .github/workflows/.luacheckrc .
Luacheck runs automatically in CI on pull requests that modify files under drivers/ (see .github/workflows/luacheck.yml).
These conventions are observed across the Edge Driver codebase:
"string" for module requires and general stringslocal for variables and functions at module scopesnake_case (e.g., local mock_device, local function test_init())UPPER_SNAKE_CASE for true constants (e.g., SENSOR_BINARY)return module_name)-- Standard library requires first
local capabilities = require "st.capabilities"
local zw = require "st.zwave"
-- Then test/integration requires
local test = require "integration_test"
local t_utils = require "integration_test.utils"
-- Then protocol-specific requires
local SensorBinary = (require "st.zwave.CommandClass.SensorBinary")({ version = 2 })
local function name() over local name = function()(driver, device, ...) arguments-- for single-line commentsCopyright header at the top of every file:
-- Copyright 2026 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0
driver-name/
src/
init.lua -- Main driver entry point
<sub_modules>.lua -- Additional driver modules
test/
test_*.lua -- Test files (must start with test_)
profiles/
*.yml -- Device profiles
fingerprints.yml -- Device fingerprints
config.yml -- Driver configuration