private makeDiagnostic()

in jshint-server/src/server.ts [589:608]


	private makeDiagnostic(problem: JSHintError): Diagnostic {
		// Setting errors (and potentially global file errors) will report on line zero, char zero.
		// Ensure that the start and end are >=0 (gets dropped by one in the return)
		if (problem.line <= 0) {
			problem.line = 1;
		}
		if (problem.character <= 0) {
			problem.character = 1;
		}
		return {
			message: problem.reason + (problem.code ? ` (${problem.code})` : ''),
			severity: this.getSeverity(problem),
			source: 'jshint',
			code: problem.code,
			range: {
				start: { line: problem.line - 1, character: problem.character - 1 },
				end: { line: problem.line - 1, character: problem.character - 1 }
			}
		};
	}