Skip to content

Commit

Permalink
Fix #69 Refactor code to depend on dockerfile-utils
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <remy.suen@gmail.com>
  • Loading branch information
rcjsuen committed Jan 17, 2018
1 parent 04f6bdb commit cc4d893
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 4,551 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog
All notable changes to this project will be documented in this file.

## [Unreleased]
### Added
- create dependency on the dockerfile-utils module ([#79](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/79))

### Fixed
- ignore ARG variables with no default values in an EXPOSE ([#199](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/199))

### Removed
- remove validation code and tests in favor of the dockerfile-utils module ([#196](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/196))

## [0.0.12] - 2018-01-11
### Added
- create dependency on the dockerfile-ast NPM module ([#196](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/196))
Expand Down Expand Up @@ -264,6 +274,7 @@ All notable changes to this project will be documented in this file.
- textDocument/formatting
- textDocument/rangeFormatting

[Unreleased]: https://github.com/rcjsuen/dockerfile-language-server-nodejs/compare/v0.0.12...HEAD
[0.0.12]: https://github.com/rcjsuen/dockerfile-language-server-nodejs/compare/v0.0.11...v0.0.12
[0.0.11]: https://github.com/rcjsuen/dockerfile-language-server-nodejs/compare/v0.0.10...v0.0.11
[0.0.10]: https://github.com/rcjsuen/dockerfile-language-server-nodejs/compare/v0.0.9...v0.0.10
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"dependencies": {
"dockerfile-ast": "0.0.1",
"dockerfile-utils": "0.0.4",
"vscode-languageserver": "^3.5.0-next.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/dockerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TextDocument, Command, Diagnostic, Range,
ExecuteCommandParams, WorkspaceEdit, TextEdit
} from 'vscode-languageserver';
import { ValidationCode } from './dockerValidator';
import { ValidationCode } from 'dockerfile-utils';

export class CommandIds {
static readonly LOWERCASE = "docker.command.convertToLowercase";
Expand Down
8 changes: 0 additions & 8 deletions src/dockerFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ export class DockerFormatter {
return this.format(document, lines, options);
}

public formatDocument(document: TextDocument, options?: FormattingOptions): TextEdit[] {
const lines: number[] = [];
for (let i = 0; i < document.lineCount; i++) {
lines.push(i);
}
return this.format(document, lines, options);
}

/**
* Formats the specified lines of the given document based on the
* provided formatting options.
Expand Down
Loading

0 comments on commit cc4d893

Please sign in to comment.