Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rauno56 committed May 20, 2022
1 parent 29d6d15 commit 5f9fead
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/detectors/DistroDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { VERSION } from '../version';
* distro-related resource information.
*/
class DistroDetector {
detect(config?: ResourceDetectionConfig): Resource {
detect(_config?: ResourceDetectionConfig): Resource {
const distroAttributes: ResourceAttributes = {
'splunk.distro.version': VERSION,
};
Expand Down
8 changes: 7 additions & 1 deletion src/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ import { hostDetector } from './detectors/HostDetector';
import { osDetector } from './detectors/OSDetector';
import { processDetector } from './detectors/ProcessDetector';

const detectors = [distroDetector, envDetector, hostDetector, osDetector, processDetector];
const detectors = [
distroDetector,
envDetector,
hostDetector,
osDetector,
processDetector,
];

export const detect = (): Resource => {
return detectors
Expand Down
6 changes: 5 additions & 1 deletion test/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ describe('options', () => {
it('has expected defaults', () => {
const options = _setDefaultOptions();

assert(/[0-9]+\.[0-9]+\.[0-9]+/.test(options.tracerConfig.resource.attributes['splunk.distro.version']));
assert(
/[0-9]+\.[0-9]+\.[0-9]+/.test(
options.tracerConfig.resource.attributes['splunk.distro.version']
)
);

// resource attributes for process, host and os are different at each run, iterate through them, make sure they exist and then delete
Object.keys(options.tracerConfig.resource.attributes)
Expand Down

0 comments on commit 5f9fead

Please sign in to comment.