<commit_before>// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Contributor:
// - <NAME> <EMAIL>

package vulnpolicy

import (
	"fmt"
	"scribe"
)

type UbuntuRelease struct {
	Name    string // Release identifier
	Version string // Release version
}

var UbuntuReleases = []UbuntuRelease{
	{"vivid", "15.04"},
	{"utopic", "14.10"},
	{"trusty", "14.04"},
	{"precise", "12.04"},
	{"lucid", "10.04"},
}

const lsb_expression = "DISTRIB_RELEASE=(\\d{1,2}\\.\\d{1,2})"

func ubuntuGetReleaseTest(doc *scribe.Document, vuln Vulnerability) (string, error) {
	reltestname := fmt.Sprintf("test-release-%v-%v", vuln.OS, vuln.Release)
	relobjname := "obj-release-lsbrelease"
	// See if we have a release definition for this already, if not
	// add it<commit_msg>add release entry for wily<commit_after>// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Contributor:
// - <NAME> <EMAIL>

package vulnpolicy

import (
	"fmt"
	"scribe"
)

type UbuntuRelease struct {
	Name    string // Release identifier
	Version string // Release version
}

var UbuntuReleases = []UbuntuRelease{
	{"wily", "15.10"},
	{"vivid", "15.04"},
	{"utopic", "14.10"},
	{"trusty", "14.04"},
	{"precise", "12.04"},
	{"lucid", "10.04"},
}

const lsb_expression = "DISTRIB_RELEASE=(\\d{1,2}\\.\\d{1,2})"

func ubuntuGetReleaseTest(doc *scribe.Document, vuln Vulnerability) (string, error) {
	reltestname := fmt.Sprintf("test-release-%v-%v", vuln.OS, vuln.Release)
	relobjname := "obj-release-lsbrelease"
	// See if we have a release definition for this already, if not
	// add it
{'fraction_non_alphanumeric': 0.16891527253103075, 'fraction_numerical': 0.032379924446842956, 'mean_word_length': 3.741687979539642, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5263592', 'n_tokens_mistral': 713, 'n_tokens_neox': 650, 'n_words': 199}